Generator of python HTTP-clients from OpenApi specification.
Project description
Pythogen
Generator of python HTTP-clients from OpenApi specification based on httpx
and pydantic
.
Features
- Discriminator
- Sync and async clients
- Tracing
- Metrics
Installation
pip install pythogen
Usage
Generate ordinary clients
- Asynchronous client
pythogen path/to/input/openapi.yaml path/to/output/client.py
- Synchronous client
pythogen path/to/input/openapi.yaml path/to/output/client.py --sync
Generate client as python-package
pythogen path/to/input/openapi.yaml path/to/package/output --package-version=0.0.1 --package-authors="Rick, Morty"
--package-version
— required;--package-authors
— optional;path/to/package/output
— path to the directory where package will be saved.
Development
- Activate environment
rm -rf venv || true python3.9 -m venv venv source venv/bin/activate make requirements
- Make changes
- Run
make test
- Execute
make clients-for-tests && make test-clients
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pythogen-0.0.22.tar.gz
(18.8 kB
view hashes)
Built Distribution
pythogen-0.0.22-py3-none-any.whl
(26.3 kB
view hashes)
Close
Hashes for pythogen-0.0.22-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9031bc32c9e0121eb1c3c38051910d3c17423e11640e98a2a87cbc6cb193fcdf |
|
MD5 | 18f92ec2ef0894dab6c2179da369f244 |
|
BLAKE2b-256 | b90ee937c85bbc8c7a616a67eda715a76c1a61ed1d058431b61ee92239d5a429 |