turboapi 0.3.23__tar.gz → 0.3.24__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {turboapi-0.3.23 → turboapi-0.3.24}/AGENTS.md +5 -3
- {turboapi-0.3.23 → turboapi-0.3.24}/Cargo.lock +1 -1
- {turboapi-0.3.23 → turboapi-0.3.24}/Cargo.toml +1 -1
- {turboapi-0.3.23 → turboapi-0.3.24}/PKG-INFO +1 -1
- {turboapi-0.3.23 → turboapi-0.3.24}/README.md +22 -22
- {turboapi-0.3.23 → turboapi-0.3.24}/pyproject.toml +1 -1
- {turboapi-0.3.23 → turboapi-0.3.24}/python/pyproject.toml +1 -1
- {turboapi-0.3.23 → turboapi-0.3.24}/src/server.rs +5 -3
- {turboapi-0.3.23 → turboapi-0.3.24}/.github/scripts/check_performance_regression.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/.github/scripts/compare_benchmarks.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/.github/workflows/README.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/.github/workflows/benchmark.yml +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/.github/workflows/build-and-release.yml +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/.github/workflows/build-wheels.yml +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/.github/workflows/ci.yml +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/.github/workflows/release.yml +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/.gitignore +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/CHANGELOG.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/FASTAPI_COMPATIBILITY.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/FASTAPI_FIXES_SUMMARY.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/LICENSE +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/PYTHON_313_FREE_THREADING_SETUP.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/PYTHON_SETUP_COMPLETE.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/RELEASE_NOTES_v0.3.1.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/RELEASE_NOTES_v0.3.13.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/WINDOWS_FIX_SUMMARY.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/adaptive_rate_test.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/benches/performance_bench.rs +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/benchmark_comparison.png +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/benchmark_graphs/turbo_vs_fastapi_performance_20250929_025531.png +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/benchmark_output.txt +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/claude.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/delete/blog/adr_python_handler_integration.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/delete/blog/phase_1.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/delete/blog/phase_2.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/delete/blog/phase_3.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/delete/blog/phase_4.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/delete/blog/phase_5.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/delete/twitterpost.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/install_benchmark_deps.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/mini-notes/001-foundation.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/mini-notes/002-routing-breakthrough.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/mini-notes/003-production-ready.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/mini-notes/004-zero-copy-revolution.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/mini-notes/005-middleware-mastery.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/mini-notes/006-python-handler-breakthrough.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/mini-notes/README.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/mini-notes/lessons-learned.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/python/MANIFEST.in +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/python/setup.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/python/turboapi/__init__.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/python/turboapi/decorators.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/python/turboapi/main_app.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/python/turboapi/middleware.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/python/turboapi/models.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/python/turboapi/request_handler.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/python/turboapi/routing.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/python/turboapi/rust_integration.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/python/turboapi/server_integration.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/python/turboapi/version_check.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/setup_python313t.sh +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/src/http2.rs +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/src/lib.rs +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/src/micro_bench.rs +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/src/middleware.rs +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/src/request.rs +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/src/response.rs +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/src/router.rs +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/src/threadpool.rs +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/src/validation.rs +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/src/websocket.rs +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/src/zerocopy.rs +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/test_no_rate_limit.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/test_rate_limiting.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/test_zerocopy.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/README.md +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/async_benchmark.sh +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/benchmark_comparison.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/comparison_before_after.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/fastapi_equivalent.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/fastapi_v0_3_20_equivalent.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/quick_benchmark.sh +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/quick_body_test.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/quick_test.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/run_v0_3_20_benchmark.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/test.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/test_async_benchmark.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/test_fastapi_compatibility.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/test_v0_3_20_fixes.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/test_v0_3_20_server.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/test_v0_3_21_async.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/wrk_benchmark.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/tests/wrk_comparison.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/turbo_vs_fastapi_benchmark_20250929_025526.json +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/turboapi/__init__.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/turboapi/decorators.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/turboapi/main_app.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/turboapi/middleware.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/turboapi/models.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/turboapi/request_handler.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/turboapi/routing.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/turboapi/rust_integration.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/turboapi/server_integration.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/turboapi/version_check.py +0 -0
- {turboapi-0.3.23 → turboapi-0.3.24}/wrk_rate_limit_test.py +0 -0
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
# TurboAPI v0.3.
|
|
1
|
+
# TurboAPI v0.3.23 - AI Agent Guide 🤖
|
|
2
2
|
|
|
3
3
|
**For AI assistants, code generation tools, and automated development systems**
|
|
4
4
|
|
|
5
5
|
## 🎯 **What TurboAPI Is**
|
|
6
6
|
|
|
7
|
-
TurboAPI is a **FastAPI-compatible** Python web framework that delivers **
|
|
7
|
+
TurboAPI is a **FastAPI-compatible** Python web framework that delivers **9-10x better performance** through:
|
|
8
8
|
- **Rust-powered HTTP core** (zero Python overhead)
|
|
9
|
-
- **Python 3.13 free-threading**
|
|
9
|
+
- **Python 3.13 free-threading** with `Python::attach()` (TRUE parallel execution)
|
|
10
|
+
- **pyo3-async-runtimes** integration (native tokio async support)
|
|
10
11
|
- **Zero-copy optimizations** and intelligent caching
|
|
11
12
|
- **100% FastAPI syntax compatibility** with automatic body parsing
|
|
12
13
|
- **Satya validation** (faster than Pydantic)
|
|
14
|
+
- **72,000+ req/s** in production benchmarks
|
|
13
15
|
|
|
14
16
|
## 🚀 **For AI Agents: Key Facts**
|
|
15
17
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# TurboAPI 🚀
|
|
2
2
|
|
|
3
|
-
**The Python web framework that gives you FastAPI's beloved developer experience with
|
|
3
|
+
**The Python web framework that gives you FastAPI's beloved developer experience with 9-10x the performance.**
|
|
4
4
|
|
|
5
|
-
Built with Rust for revolutionary speed, designed with Python for developer happiness.
|
|
5
|
+
Built with Rust for revolutionary speed, designed with Python for developer happiness. **First framework to leverage Python 3.13 free-threading for true parallel request handling!**
|
|
6
6
|
|
|
7
7
|
> **⚡ Try it in 30 seconds:** `python live_performance_showcase.py` → Visit `http://127.0.0.1:8080`
|
|
8
|
-
> **🔥
|
|
9
|
-
> **🎯 Zero migration effort:** Change 1 import line, keep all your existing code
|
|
8
|
+
> **🔥 72,000+ requests/sec:** 9-10x faster than FastAPI in real benchmarks!
|
|
9
|
+
> **🎯 Zero migration effort:** Change 1 import line, keep all your existing code
|
|
10
|
+
> **🧵 Python 3.13 Free-Threading:** TRUE parallel Python execution - no GIL!
|
|
10
11
|
|
|
11
12
|
## 🎨 **100% FastAPI-Compatible Developer Experience**
|
|
12
13
|
|
|
@@ -46,32 +47,31 @@ app.run(host="127.0.0.1", port=8000)
|
|
|
46
47
|
|
|
47
48
|
## 🚀 **Revolutionary Performance**
|
|
48
49
|
|
|
49
|
-
### **Why TurboAPI is
|
|
50
|
+
### **Why TurboAPI is 9-10x Faster**
|
|
50
51
|
- **🦀 Rust-Powered HTTP Core**: Zero Python overhead for request handling
|
|
51
52
|
- **⚡ Zero Middleware Overhead**: Rust-native middleware pipeline
|
|
52
|
-
- **🧵 Free-Threading
|
|
53
|
+
- **🧵 Python 3.13 Free-Threading**: TRUE parallel Python execution with `Python::attach()`
|
|
53
54
|
- **💾 Zero-Copy Optimizations**: Direct memory access, no Python copying
|
|
54
|
-
- **🔄
|
|
55
|
+
- **🔄 pyo3-async-runtimes**: Native tokio integration for async handlers
|
|
56
|
+
- **🎯 Multi-threaded**: 3x CPU cores worker threads for maximum throughput
|
|
55
57
|
|
|
56
|
-
### **Benchmark Results vs FastAPI** (wrk
|
|
57
|
-
|
|
58
|
-

|
|
58
|
+
### **Benchmark Results vs FastAPI** (v0.3.23 - wrk, 4 threads, 100 connections)
|
|
59
59
|
|
|
60
60
|
```
|
|
61
|
-
🎯
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
🎯 TurboAPI v0.3.23 (Python 3.13 Free-Threading):
|
|
62
|
+
Simple GET: 72,903 req/s | Latency: ~1.4ms
|
|
63
|
+
Parameterized: 71,690 req/s | Latency: ~1.4ms
|
|
64
|
+
Async Handlers: 13,417 req/s | Latency: ~7.5ms
|
|
65
65
|
|
|
66
|
-
🎯
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
🎯 FastAPI (uvicorn):
|
|
67
|
+
Simple GET: 8,337 req/s | Latency: ~12ms
|
|
68
|
+
Parameterized: 7,413 req/s | Latency: ~13ms
|
|
69
|
+
Async Handlers: 8,337 req/s | Latency: ~12ms
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
📊 Performance Comparison:
|
|
72
|
+
Sync Handlers: 9.0x faster than FastAPI 🚀🚀🚀
|
|
73
|
+
Async Handlers: 1.6x faster than FastAPI ✅
|
|
74
|
+
Latency: 8.5x lower than FastAPI ⚡
|
|
75
75
|
|
|
76
76
|
🚀 Summary:
|
|
77
77
|
• Average speedup: 5-13x faster than FastAPI
|
|
@@ -4,7 +4,7 @@ build-backend = "maturin"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "turboapi"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.24"
|
|
8
8
|
description = "Revolutionary Python web framework with FastAPI syntax and 5-10x performance (Python 3.13+ free-threading required)"
|
|
9
9
|
requires-python = ">=3.13"
|
|
10
10
|
license = {text = "MIT"}
|
|
@@ -4,7 +4,7 @@ build-backend = "maturin"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "turboapi"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.24"
|
|
8
8
|
description = "Revolutionary Python web framework with FastAPI syntax and 5-10x performance (Python 3.13+ free-threading required)"
|
|
9
9
|
requires-python = ">=3.13"
|
|
10
10
|
license = {text = "MIT"}
|
|
@@ -468,13 +468,15 @@ fn call_python_handler_fast(
|
|
|
468
468
|
|
|
469
469
|
// Handle sync vs async results differently
|
|
470
470
|
if is_coroutine {
|
|
471
|
-
// Async handler - use pyo3-async-runtimes
|
|
472
|
-
//
|
|
471
|
+
// Async handler - use pyo3-async-runtimes for tokio integration
|
|
472
|
+
// NOTE: Still uses block_in_place() - true async requires making handle_request async
|
|
473
|
+
// Current performance: ~13K RPS (vs 72K for sync)
|
|
474
|
+
// Future optimization: Make entire request pipeline async (v0.4.0)
|
|
473
475
|
|
|
474
476
|
// Convert Python coroutine to Rust future using pyo3-async-runtimes
|
|
475
477
|
let rust_future = pyo3_async_runtimes::tokio::into_future(result.clone_ref(py).into_bound(py))?;
|
|
476
478
|
|
|
477
|
-
// Await the
|
|
479
|
+
// Await the future (releases Python but blocks tokio thread)
|
|
478
480
|
let awaited_result = py.allow_threads(|| {
|
|
479
481
|
tokio::task::block_in_place(|| {
|
|
480
482
|
tokio::runtime::Handle::current().block_on(rust_future)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|