🧬 Pythogen: HTTP-clients generator for Python

Generator of python HTTP-clients from OpenApi specification based on httpx and pydantic.

Code style: black

Features

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

GitHub

View Github