🧬 Pythogen: HTTP-clients generator for Python
Generator of python HTTP-clients from OpenApi specification based on httpx
and pydantic
.
Features
- Discriminator
- Sync and async clients
- Tracing
- Metrics
Usage
Activate environment
rm -rf venv || true
python3.9 -m venv venv
source venv/bin/activate
make requirements
Generate clients
- Async
python pythogen/entrypoint.py path/to/input/openapi.yaml path/to/output/client.py
- Sync
python pythogen/entrypoint.py path/to/input/openapi.yaml path/to/output/client.py --sync
For developers
- Activate environment
rm -rf venv || true python3.9 -m venv venv source venv/bin/activate make requirements
- Make changes
- Execute
make clients-for-tests
- Run tests
make tests-in-docker