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
Examples
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 -m venv venv source venv/bin/activate make requirements
- Make changes
- 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.23.tar.gz
(19.3 kB
view hashes)
Built Distribution
pythogen-0.0.23-py3-none-any.whl
(26.5 kB
view hashes)
Close
Hashes for pythogen-0.0.23-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a703131a22653e1c09c064bfba492572aaf0ec00f1fae48c8d7dd363cea0065f |
|
MD5 | 2ec6e9fe85f486b277703661263b4e37 |
|
BLAKE2b-256 | f66867e1ef607ed49c577c72016ab34b226657b4cfc06d625104ad28e5a19579 |