mutating/transfunctions
Say NO to Python fragmentation on sync and async
Eliminates sync/async code duplication by generating specialized function variants from AST-level templates using context managers (`sync_context`, `async_context`, `generator_context`) to mark variant-specific code paths. Supports standalone function generation via methods like `get_async_function()` and composite "superfunctions" that adapt their behavior based on how they're called, while preserving closures and typing information across all variants.
198 stars and 4,499 monthly downloads. Available on PyPI.
Stars
198
Forks
6
Language
Python
License
MIT
Category
Last pushed
Mar 20, 2026
Monthly downloads
4,499
Commits (30d)
0
Dependencies
3
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/ai-coding/mutating/transfunctions"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Related tools
inducer/cgen
C/C++ source generation from an AST
westandskif/convtools
convtools is a specialized Python library for dynamic, declarative data transformations with...
pyecore/pyecore
A Python(nic) Implementation of EMF/Ecore (Eclipse Modeling Framework)
cogu/cfile
A python C code generator
FEniCS/ffcx
Next generation FEniCS Form Compiler for finite element forms