Interact with APIs through methods and Pydantic models.
Project description
Generic API Client
Interact with APIs through methods and Pydantic models.
Features
- Interact with an API through Pydantic models and python methods:
- Input and output of each endpoint can be described by a Pydantic model
- Each endpoint can be associated to a python method
- Allow developers to use complex APIs with the static evaluation of the code performed by IDEs
- Comprehensive API collections using Jinja templates
- Handle API versions via template and Pydantic Model
- Cache built to handle write and read requests
Installation
pip install generic-api-client
Usage
See our wiki or the new docs directory for detailed guidance on creating an APIClient, defining Segments, and building custom APIConnectors.
Examples
The repository includes an examples/ directory with working examples, such as the nextcloud_api demo. These examples demonstrate how to use the library to interact with the Nextcloud API.
Documentation
A dedicated docs/ directory contains markdown files that serve as a lightweight wiki, covering:
- Overview of the library
- How to instantiate an
APIClient - Defining custom
Segments - Creating
APIConnectors - Using the Nextcloud example
License
The project is released under the MIT License.
Acknowledgements
This project was built with the help of Claude Code and local Ollama AI assistants. They were used mainly for documentation so keep in mind that even if it has been reviewed it may contains errors.
Project Status
NOTE The project is currently in development phase. If you have any remark or question feel free to open an Issue
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file generic_api_client-1.0.0.tar.gz.
File metadata
- Download URL: generic_api_client-1.0.0.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.0 CPython/3.14.4 Linux/6.1.0-37-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53c9fef90260dab5916b2c335a6e384c59187b8494714f30f676994d60cd4080
|
|
| MD5 |
f7037a9b026756a389844cccd942b966
|
|
| BLAKE2b-256 |
dc87af5dbe82a0c47229d382ea4a4c2f5a9477974e2436b609c849b8ef310dfa
|
File details
Details for the file generic_api_client-1.0.0-py3-none-any.whl.
File metadata
- Download URL: generic_api_client-1.0.0-py3-none-any.whl
- Upload date:
- Size: 26.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.0 CPython/3.14.4 Linux/6.1.0-37-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0b19e053958fa476530afbc984327bd88dfb522bbb6ffebfd17b0e695143c9e
|
|
| MD5 |
b32f430ce336d214671b48041a085c3c
|
|
| BLAKE2b-256 |
fa7d88759726f960dbe480f4c3c57dec2c3c0de530da34eeda474ef895282e3d
|