README
- Fast and efficient (probably the fastest Python web framework).
- Schemas / Validation engine. (15x faster than marshmallow)
- Template Engine (AOT compiler, smart cache/reloader, deep inheritance, 2x faster than Jinja2)
- Websockets (RFC 7118 / RFC 6455)
- Components / Nested Blueprints / Domain Based Routes
- Connection Reaper / Self-Healing Workers
- Sessions (encrypted cookies, Redis, Memcache, files)
- Download / Upload streaming
- MultipartForm streaming (Cython finite state machine)
- Caching tools (go fast or go home)
- Complete flow customization (A.k.a Middlewares / Signals / Listeners / Black Magic)
- Static Files (Smart Cache, Range, LastModified, ETags, Streaming)
- Complete Test Framework (async & websocket included)
- Type hints, type hints everywhere.
- Be the fastest Python web framework.
- Windows / Linux / MacOS.
- Correctness > Performance > Easiness of Use > Framework Maintenance.
- Server and Framework, one soul.
- Enjoyable development environment.
- Provide a modern Flask alternative to the community.
import asyncio
from vibora import Vibora
from vibora.request import Request
from vibora.responses import JsonResponse
app = Vibora()
@app.route('/')
def home():
return JsonResponse({'hello': 'world'})
@app.route('/async', methods=['GET'])
async def home_async(request: Request):
await asyncio.sleep(1)
print(request.headers)
return JsonResponse({'hello': 'world'}, status_code=201)
if __name__ == '__main__':
app.run()
- Logs
- Router Host/Subdomains
- Async requests timeout.
- Implement a faster, correct and tested router.
- Remove requests dependency
- Pause Writing big templates
- Streaming
- Improve URL FOR
- Tests
- Verify compile warnings by messing up any extension path on setup.py
- Check on big uploads
- Command line tools
- Websockets
- HTTP2 Support.
- Rate Limiting (AWS & Ip Tables integration to help with DDOS)
- Cluster-Wide publish/subscribe events API.
- Near real-time API with statistics about the server.
- Native i18n support.
- Auto Reloading
- JIT compiler for user routes.
- Authentication/Authorization Framework
- Armin Ronacher. No words needed, this whole framework is based on many of his projects.
- Cython developers. Crazy stuff. Awesome work.
- Paweł Piotr Przeradowski. Japronto inspired a lot this framework, thanks bro!
- Where the performance comes from ?
- Cython. Critical framework pieces are written Cython so it can leverage C speed in critical stuff.
- Common tasks as template rendering, schema validation were made builtin in the framework,written from scratch with performance in mind.
- It's Pypy compatible ?
- Not yet. But I'll make sure it works on Pypy as soon as Pypy reaches 3.5 stable.
- Why not use Jinja2 ?
- It's hell easier to write something from scratch when looking for performance on somethingalready heavily optimized.
- Where is Japronto on benchmarks ?
- Japronto is a proof of concept. The whole framework is missing a huge chunk of features and fixes.The author of the framework does not encourage the usage of it and so do I.
- Japronto can be faster than Vibora on naked benchmarks thanks to impressive hand-coded Cand faster HTTP parser (pico X noyent).
- Vibora does not use "picohttparser" because I don't think it's safe enough and there are bunch of issues/pullrequests waiting years to be fixed.
- Hand-coded C extensions can be a nightmare hell to non-expert C devs so I'm notwilling to replace Cython with baby cared C code. Still I'm willing to replace Cython with Rust extensionsif they get stable enough.
- Compare a naked framework against a fully featured framework is just dumb. To give you a reason:Vibora was 30% faster before security and features were a concern.
- Why don't export the template engine into a new project ?
- I'm planning to do so but right now I want to focus on Vibora features/integration.
- Can we make it even faster ?
- Sure! I have a hell bunch of ideas but I'm one man army. Are you willing to help me ? :)
Last modified 4yr ago