Launching today

pyfect
Effect for Python: typed errors, services and concurrency
3 followers
Effect for Python: typed errors, services and concurrency
3 followers
pyfect brings Effect's model to Python. A program's type says what it returns, how it can fail and which services it needs, so pyright rejects code that forgets to handle an error or provide a dependency. It has structured concurrency, layers, streams, schema, HTTP, SQL, RPC and AI providers, and it feels like Python: match on results, with-blocks for resources, and parallel effects on free-threaded 3.14. MIT licensed.





Free
Launch Team

AWS Activate CreditsCredits that fuel your startup’s next milestone
Promoted
Hi Product Hunt! I built pyfect because I wanted Effect's model in Python.
In pyfect, a program's type says three things: what it returns, how it can fail, and which services it needs. pyright then catches the mistakes that usually show up in production, like an error nobody handles or a dependency nobody provides.
It follows Effect v4's semantics closely, so Effect's docs and ideas carry over. It also uses what Python has that TypeScript doesn't:
matchon results and tagged errors,withblocks for scopes and resources, schemas read from type annotations, exception groups for combined failures, and effects that run in parallel on free-threaded 3.14 or in subinterpreters.Install it with
pip install pyfect-dev. The docs are at pyfect.dev.I'd love feedback, especially from anyone who has used Effect in TypeScript.