Releases: GrandpaEJ/BustAPI
v0.10.3
[v0.10.3] - 2026-02-15
Fixed
-
Request Parameter Injection (#22):
- Fixed route handlers not receiving the
requestparameter when declared in their signature. - Added automatic request parameter injection in both sync and async wrapper functions.
- JWT authentication endpoints now work correctly with request-dependent handlers.
- Fixed route handlers not receiving the
-
Blueprint JWT Support (#23):
- Improved error message when JWT is not initialized, with specific guidance for Blueprint usage.
- Added comprehensive example (
examples/routing/blueprint_with_jwt.py) showing correct JWT + Blueprint pattern. - Clarified that JWT must be initialized on the main app, not in blueprint files.
Full Changelog: v0.10.1...v0.10.3
v0.10.1
Full Changelog: v0.10.0...v0.10.1
v0.10.0
Major Features
- WebSocket Configuration:
- Introduced
WebSocketConfigstruct accessible from Python. - RAM Protection:
max_message_sizelimit enforces strict payload caps. - CPU Protection:
rate_limit(messages/sec) prevents abuse. - Support for
heartbeat_intervaland connectiontimeout. - Applied to both
@app.websocket(Standard) and@app.turbo_websocket(Turbo) routes.
- Introduced
Documentation & Examples
- Added
examples/websockets_demo.pyfeaturing echo, chat, and limits. - Added
docs/websockets.mdwith performance guides and configuration details. - Consolidated benchmark suite into
benchmarks/bustapi_bench.pyandbenchmarks/comparison_bench.py.
v0.9.2
Full Changelog: v0.9.0...v0.9.2
v0.9.1 -Fixed
[0.9.1] - 2026-01-27
Fixed
- CI/CD Expansion: Added comprehensive cross-platform build support:
- Alpine Linux (musl): Added
musllinuxwheels for x86_64 (#14). - ARM64 (aarch64): Added support for both glibc (Ubuntu/Debian) and musl (Alpine) on ARM processors.
- Alpine Linux (musl): Added
- Session Persistence: Fixed bug where
session.pop()did not save changes (#17). - Template Path: Fixed
BustAPI()default template loading when noimport_nameis provided (#15). - Content-Type:
render_templatenow reliably returnstext/htmlheaders.
v0.9.0 -beta-rc
[0.9.0] - 2026-01-22
Major Features
-
WebSocket Support:
- Full WebSocket support with
@app.websocket()decorator. - Integration with
actix-wsfor heavy lifting in Rust. - Python-side API compatible with popular async frameworks.
- Full WebSocket support with
-
Turbo WebSocket (Performance):
- New
@app.turbo_websocket()decorator for ultra-high performance. - Pure Rust Message Handling: Messages are processed entirely in Rust (no Python GIL, no callbacks) for maximum throughput.
- ~74% Performance Boost: Benchmarks show ~17k msg/sec vs ~10k msg/sec for standard mode.
- New
-
Video Streaming & Range Requests:
- Full support for HTTP
Rangerequests (seeking, scrubbing) viaFileResponseand static files. - Implemented
HEADmethod support for all routes to handle browser pre-flight checks correctly. - Video streaming is now production-ready (verified with browser tests).
- Full support for HTTP
-
Rust-Core Request Logging:
- Migrated logging logic from Python to Rust for 100% request coverage.
- Now captures 404 Not Found, Static Files, and Fast Routes which were previously invisible to Python middleware.
- High-performance, zero-allocation logging with accurate Rust-level latency timings.
- Removed duplicate logging hooks from Python side.
-
Rust-Based Path Parameter Extraction:
- Moved regex parsing and parameter extraction to the Rust backend.
- Significant performance boost for dynamic routes.
- Supports
int,float,path, and strict validation rules entirely in Rust.
-
Developer Experience:
- Enhanced Hot-Reloader: Cleaner output, suppresses internal noise, and clearly shows changed files.
bustapi.logging: New customizable logging module for users.
Added
src/websocket/mod.rsandsession.rsfor core WebSocket logic.src/websocket/turbo.rsfor optimized Rust-only handling.examples/advanced/28_websocket.pyand29_turbo_websocket.py.benchmarks/ws_benchmark.pyfor testing WebSocket performance.
Refactoring
- Modular Application Structure:
- Refactored
app.pyinto a Mixin-based architecture (RoutingMixin,ExtractionMixin,ContextMixin,HooksMixin) for better maintainability. - Improved WSGI/ASGI compatibility with
WSGIAdaptermixin.
- Refactored
Fixed
- Static Route Registration: Fixed a bug where static route patterns were generated without a leading slash.
- Example Fixes: Updated
27_video_stream.pyto correctly resolve static folders relative to the script directory. - Process Management: Fixed a recursion bug in
kill_processutility.
Performance
- Optimized Route Matching: Deterministic scoring system and Rust-side optimizations.
Fixed
v0.8.0 -beta
[0.8.0] - 2026-01-14
Added
-
Typed Dynamic Turbo Routes:
@app.turbo_route()now supports path parameters:/users/<int:id>.- Path parameters are parsed in Rust for maximum performance (~30k RPS).
- Supports
int,float,str, andpathparameter types. - Automatic type validation with 404 response for mismatches.
- Big integer support via Python fallback (no overflow).
- Multiple parameters:
/posts/<int:id>/comments/<int:cid>.
-
Turbo Routes Documentation:
- New
docs/user-guide/turbo-routes.mdwith comprehensive guide. - Example
examples/turbo/typed_turbo_example.py.
- New
Changed
turbo_routedecorator now auto-detects parameters from route pattern.- Improved error responses with structured JSON for type mismatches.
Fixed
- Static File Serving:
- Fixed 404 errors for nested static files (e.g.
css/style.css) using new wildcard routing. - Robust Path Resolution: Implemented
get_root_pathto correctly locatetemplatesandstaticfolders regardless of working directory.
- Fixed 404 errors for nested static files (e.g.
- Dependency Issues:
- Removed
robyndependency to eliminate build conflicts and simplify installation. - Ensured compatibility across diverse Linux environments.
- Removed
Performance
- Dynamic turbo routes: ~30,000 requests/sec (vs ~18,000 for regular routes).
- 65% improvement for simple lookup endpoints.
🚀 Major Performance Breakthrough (Operation Mach 5)
-
Native Multiprocessing (Linux):
- Implemented
os.fork()based process manager withSO_REUSEPORTload balancing. - Result: 97,376 RPS for standard routes (up from ~25k).
- Beat Sanic (41k) and BlackSheep (28k) by a massive margin.
- Memory usage remains efficient (~152MB for 4 workers).
- Implemented
-
Cross-Platform Support (Issue #9):
- New
python/bustapi/multiprocess.pymodule. - New
ci-multiplatform.ymlfor automated cross-platform testing withohabenchmarks. - CI Benchmark Results:
- Linux: 55,726 RPS (CI runner) / 105,012 RPS (local)
- macOS: 35,560 RPS (single-process)
- Windows: 17,772 RPS (single-process)
- Platform-specific behavior:
- Linux: Full multiprocessing with
SO_REUSEPORT(100k+ RPS) - macOS/Windows: Single-process fallback (Rust still 3x faster than Flask!)
- Linux: Full multiprocessing with
- New
-
Cached Turbo Routes:
- New built-in caching for turbo routes:
@app.turbo_route("/", cache_ttl=60). - Result: ~140,961 RPS for cached endpoints.
- Zero-latency responses (< 1ms).
- New built-in caching for turbo routes:
Full Changelog: v0.7.0...v0.8.0
v0.7.0 -beta
[0.7.0] - 2026-01-14 -beta
Added
-
JWT Authentication (Rust-backed):
JWTclass for token management with HS256/HS384/HS512 algorithms.create_access_token()andcreate_refresh_token()methods.decode_token()andverify_token()for validation.- Decorators:
@jwt_required,@jwt_optional,@fresh_jwt_required,@jwt_refresh_token_required. - Custom claims support and configurable expiry times.
-
Session Login (Flask-Login style):
LoginManager- Configure user loading and session handling.login_user()/logout_user()- Manage user sessions.current_userproxy - Access logged-in user anywhere.BaseUser/AnonUser- User model mixins.@login_required,@fresh_login_required- Route protection.@roles_required,@permission_required- Role-based access.
-
Password Hashing (Argon2id):
hash_password()- Secure password hashing using Argon2id (OWASP recommended).verify_password()- Constant-time password verification.- PHC-formatted hashes with automatic salt generation.
-
Security Utilities:
generate_token()- Cryptographically secure random token generation.generate_csrf_token()- CSRF token generation (32 bytes, hex-encoded).CSRFProtectclass for automatic CSRF validation on forms.
-
New Dependencies (Rust):
jsonwebtokenv9 for JWT encoding/decoding.argon2v0.5 for password hashing.randv0.8 for secure random generation.
-
CLI Tool (
bustapi):bustapi new: Scaffold new projects withpip,uv, orpoetry.bustapi run: Run development server with hot reload.bustapi routes: List all registered routes.bustapi info: View system and installation details.
-
Native Hot Reloading: replaced
watchfileswith a Rust-native watcher using thenotifycrate. This removes thewatchfilesPython dependency and provides instant, low-overhead reloads -
Advanced Routing:
- Deterministic Matching: Implemented scoring system (Exact > Typed > Generic > Wildcard) to resolve overlapping routes predictably.
- Wildcard Paths: Added
<path:name>type for matching multiple URL segments (e.g. for static files).
-
Examples:
17_jwt_auth.py,18_session_login.py. -
Tests:
test_jwt.py,test_auth.py,test_login_manager.py. -
Performance Optimizations:
- Multiprocessing with SO_REUSEPORT: Uses
os.fork()to spawn multiple worker processes sharing the same port for true parallel scaling. - Turbo Routes: New
@app.turbo_route()decorator for zero-overhead routing—skips request context, sessions, and middleware for simple handlers. - mimalloc Allocator: Rust backend uses mimalloc for faster memory allocation.
- Zero-Copy JSON: Native Rust JSON serialization with
serde_json, bypassing Python'sjson.dumps(). - CPU-Specific Optimizations: Build with
target-cpu=nativefor maximum performance.
- Multiprocessing with SO_REUSEPORT: Uses
-
Python 3.14 Support (#8):
- Upgraded PyO3 from
0.23to0.27to support Python 3.14. - Updated deprecated APIs:
Python::with_gil→Python::attach,PyObject→Py<PyAny>,downcast→cast.
- Upgraded PyO3 from
Fixed
- Static File Serving:
- Fixed 404 errors for nested static files (e.g.
css/style.css) using new wildcard routing. - Robust Path Resolution: Implemented
get_root_pathto correctly locatetemplatesandstaticfolders regardless of working directory.
- Fixed 404 errors for nested static files (e.g.
Changed
- Refactored
bustapi.authinto modular package:auth/login.py,auth/user.py,auth/decorators.py,auth/password.py,auth/tokens.py,auth/csrf.py.
v0.6.0 -Beta
[0.6.0] - 2026-01-13 -beta
Added
- HTTP Range Support for Video Streaming: Static files now support HTTP Range requests with
206 Partial Contentresponses (#1) - Strict Path Routing: Bidirectional redirect support (FastAPI-style) ensures
/fooand/foo/are both accessible, returning307 Temporary Redirectto the canonical URL (#7) - Streaming Response Support: Implemented
StreamingResponsefor efficiency streaming of content from sync and async iterators (#3) - Async Request Body Support: Added
await request.body()andasync for chunk in request.stream()methods for async compatibility (#4) - Keyword Arguments Support: Automatic injection of path and query parameters into handler keyword arguments (#6)
- Query Params Alias: Added
request.query_paramsproperty (alias torequest.args) for FastAPI compatibility (#5) - Flask-style
send_fileHelper: Updated to returnFileResponsefor efficient file serving with Range support - Absolute Path Support:
FileResponsenow automatically converts relative paths to absolute paths for flexible file serving - Video streaming example (
examples/27_video_stream.py) demonstrating static and dynamic video serving - Documentation: Updated user guides for Routing, Responses (Streaming), and Request Data (Async Body).
Removed
- Manual File Serving Module (
src/file_serving.rs): Removed in favor of robustactix-filesintegration which handles Range requests automatically.
Changed
- Refactored
src/server/handlers.rsto useactix-filesfor serving file responses. - Updated
src/bindings/converters.rsto passFileResponseandStreamingResponseobjects directly to Rust backend. - Updated
src/bindings/handlers.rsto pass request headers to response converter.
Fixed
- Windows Support: Gated Unix-specific hot-reload logic (
nix::unistd) to fix build errors on Windows. - Jinja2: Added
jinja2as a core dependency to ensurerender_templateworks out-of-the-box and fix CI test failures. - CI/CD: Resolved Rust
clippychecks formanual_flattenandtype_complexityto ensure strict CI compliance. - Dynamic Route Range Support: Dynamic routes returning
FileResponsenow correctly support Range requests (Video seeking/scrubbing). - Improved memory efficiency for large file serving.
v0.5.0 -beta
[0.5.0] - 2026-01-01
Major Features
-
FastAPI Compatibility Layer:
- Added support for
Header,Cookie,Form, andFileparameter validators. - Implemented
UploadFilewrapper for easier file handling. - Added
BackgroundTasksfor simple background execution. - Introduced
JSONResponse,HTMLResponse,PlainTextResponse,RedirectResponse,FileResponsealiases.
- Added support for
-
Core Context Improvements:
- Implemented functional
g(application globals) andcurrent_appcontext proxies. - Fixed issues where these globals were exported but not importable/functional.
- Ensured correct context isolation using
contextvars.
- Implemented functional
-
API Completeness:
- Improved
Requestobject compatibility with Flask/Werkzeug (e.g.request.files,request.cookiesvia Rust).
- Improved