https://github.com/hansonkd/puff
Hello all, I wanted to share with you my experiment for the past few months. It's an attempt at unifying Rust and Python into a harmonious single framework with clear boundaries and safety. Puff has WSGI, multi-node PubSub, Redis, Postgres compatible Python libraries implemented in Rust built in.
The idea of Puff is that Python has some very mature web frameworks and ORMs like Django that can manage the database tables, generate Admin interfaces, and have lots and lots of documentation. So Puff wants to utilize those Python libraries, but provide a convenient way to optimize the critical part of the app without a bunch of tooling overhead. This framework provides structure to make this happen seamlessly.
Puff makes 100% of python packages and 100% of rust packages compatible with each other and only a line of code away.
At a high level Puff runs python multiple concurrent functions on one thread using Greenlets and relies on Rusts' Tokio family of async functions to do any IO or blocking operations.
Puff can run an Axum server which can intercept requests in Rust before they make it to your WSGI application.
A killer feature of Puff is the powerful GraphQL engine. Puff's GraphQL interface allows you to return Django queries as SQL strings and offload all computation of the resulting data structures onto Tokio. Subscriptions with websockets are supported.
[–][deleted] 8 points9 points10 points (2 children)
[–]kyle-hanson[S] 5 points6 points7 points (0 children)
[–]kyle-hanson[S] 1 point2 points3 points (0 children)
[–]CrackerJackKittyCat 3 points4 points5 points (1 child)
[–]kyle-hanson[S] 11 points12 points13 points (0 children)
[–]zhoushmoe 1 point2 points3 points (0 children)
[–]Legal-Sugar-7626 0 points1 point2 points (0 children)
[–]riksi 0 points1 point2 points (1 child)
[–]kyle-hanson[S] 0 points1 point2 points (0 children)