KO
|
EN
gitlite — search
Search
#python
#typescript
#ai
#nextjs
#javascript
#java
#docker
#nodejs
#reactjs
#openai-api
#chatgpt
#openai
pythogen
★ 65
Open GitHub ↗
Awesome python HTTP-clients from OpenAPI
Download README (.md)
Explore Similar Repositories
R86S-QuickInstaller
:
R86S System Quick Installer
OmoriSource
:
Source code of the game OMORI in the form of RPG Maker project
dev-rel
:
All of Aztec's workshops, resources, tutorials, ideas, and useful tools
NeoRoot.lua
:
Yet another light-weight rooter written in Lua
wgsl-preprocessor
:
A simple, template literals-based preprocessor for WGSL shaders
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
pythogen
?
Download (.md)
<p align="center"> <img src="./docs/img/logo.png" style="width: 100%; max-width: 500px" alt="pythogen"> <br /> Generator of python HTTP-clients from OpenApi specification based on <i>httpx</i> and <i>pydantic</i> </p> <p align="center"> <a href="https://github.com/artsmolin/pythogen/actions" target="_blank"> <img src="https://github.com/artsmolin/pythogen/actions/workflows/test.yml/badge.svg" alt="tests"> </a> <a href="https://codecov.io/gh/artsmolin/pythogen" target="_blank"> <img src="https://codecov.io/gh/artsmolin/pythogen/branch/main/graph/badge.svg?token=6JR6NB8Y9Z" alt="coverage"> </a> <a href="https://pypi.org/project/pythogen/" target="_blank"> <img src="https://img.shields.io/pypi/v/pythogen.svg?color=%2334D058" alt="pypi"> </a> <a href="https://pypi.python.org/pypi/pythogen/" target="_blank"> <img src="https://img.shields.io/pypi/pyversions/pythogen.svg?color=%2334D058" alt="python"> </a> </p> --- **Documentation**: <a href="https://artsmolin.github.io/pythogen" target="_blank">https://artsmolin.github.io/pythogen</a> **Source Code**: <a href="https://github.com/artsmolin/pythogen" target="_blank">https://github.com/artsmolin/pythogen</a> **Examples**: [sync](/examples/petstore/client_sync.py) and [async](/examples/petstore/client_async.py) clients for [Petstore OpenAPI](/examples/petstore/openapi.yaml) --- ## Installation You can install the library ```shell pip install pythogen ``` or use Docker ```shell docker pull artsmolin/pythogen ``` ## Generation - `path/to/input` — path to the directory with openapi.yaml; - `path/to/output` — the path to the directory where the generated client will be saved; Generate a client using the installed library ```shell pythogen path/to/input/openapi.yaml path/to/output/client.py ``` or via Docker ```shell docker run \ -v ./path/to/input:/opt/path/to/input \ -v ./path/to/output:/opt/path/to/output \ artsmolin/pythogen \ path/to/input/openapi.yaml \ path/to/output/client.py ``` ## Usage ```python from petstore.client_async import Client from petstore.client_async import Pet from petstore.client_async import EmptyBody from petstore.client_async import FindPetsByStatusQueryParams client = Client(base_url="http://your.base.url") pets: list[Pet] | EmptyBody = await client.findPetsByStatus( query_params=FindPetsByStatusQueryParams(status="available"), ) ```