Typed API Clients from OpenAPI specs
Project description
⚜️ Clientele
Typed API Clients from OpenAPI specs
Clientele lets you generate fully-typed, functional, API Clients from OpenAPI specs.
It uses modern tools to be blazing fast and type safe.
Plus - there is no complex boilerplate and the generated code is very small.
Features
- Fully typed API Client using Pydantic.
- Minimalist and easy to use - the generated code is tiny.
- Choose either sync (default) or async - we support both.
- Generates authentication code for you (curently only supports HTTP Bearer auth)
- Written entirely in Python - no need to install other languages to use OpenAPI.
We're built on:
Install
poetry add clientele
Usage
From URLs
clientele generate -u http://URL_TO_OPEN_API.json -o output/
From files
clientele generate -f path/to/file.json -o output/
Async Client
clientele generate -f path/to/file.json -o output/ --asyncio t
Authentication
If your OpenAPI spec provides security information for the following authentication methods:
- HTTP Bearer
Then clientele will provide you information on the environment variables you need to set to make this work during the generation. For example:
Please set
* MY_CLIENT_AUTH_USER_KEY
* MY_CLIENT_AUTH_PASS_KEY
environment variable to use basic authentication
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
clientele-0.2.0.tar.gz
(9.0 kB
view hashes)
Built Distribution
clientele-0.2.0-py3-none-any.whl
(10.9 kB
view hashes)
Close
Hashes for clientele-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a06e011bb0a4756e38964b068d6ab61c012fa5aa72aabed23e6ce0be9572143 |
|
MD5 | 8028247a05716cb1cc6bcbd359445367 |
|
BLAKE2b-256 | 31f7cb279567e101ab451c166f2d58a1af0e56356137522a136344917ebc356f |