Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kython28/leviathan
A lightning-fast Zig-powered event loop for Python's asyncio.
https://github.com/kython28/leviathan
Last synced: 25 days ago
JSON representation
A lightning-fast Zig-powered event loop for Python's asyncio.
- Host: GitHub
- URL: https://github.com/kython28/leviathan
- Owner: kython28
- License: mit
- Created: 2024-10-08T17:19:06.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2025-01-14T07:27:01.000Z (about 1 month ago)
- Last Synced: 2025-01-14T07:35:20.658Z (about 1 month ago)
- Language: Zig
- Size: 849 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-zig - leviathan🗒️A lightning-fast Zig-powered event loop for Python's asyncio.
README
# Leviathan
From the depths of the sea, where darkness meets vastness, emerges Leviathan: an unyielding force of speed and power. In a world where the arcane and the agile intertwine, a loop forged in Python takes its dance. Leviathan, master of the journey, governs events with a steady hand—an **ultra-fast event loop** that deploys its bastion in **asyncio**, powered by the artistry of Zig. Between promises and futures, its path is clear: to rule swiftly where code is prepared.
## 🚀 Features
- **Ultra-fast speed**: Thanks to low-level optimizations enabled by Zig.
- **Full asyncio compatibility**: A drop-in replacement for the default event loop.
- **Efficient design**: Focused on maximizing performance and minimizing latency.
- **Simplicity**: Easy integration with existing Python projects.## 📜 Requirements
- Python 3.13+
- Zig 0.14.x (for development or contributions)## 🔧 Installation
To install Leviathan, just execute:
```bash
python setup.py install
```## 📦 Basic Usage
```python
import leviathan
import asyncioasync def main():
print("Hello from Leviathan!")
await asyncio.sleep(1)
print("Goodbye from Leviathan!")leviathan.run(main())
```## 🧪 Benchmarks
Leviathan stands out for its speed and performance. Here is a preliminary chart illustrating its superiority over other event loops:
![Performance Benchmark](benchmark_results/chat.png)
For more information and additional tests, check the following file: [More benchmarks and details](BENCHMARK.md).
---
⚠️ **Warning**: Leviathan is still under active development. Some integrations, such as full networking support, are pending implementation.