Metadata-Version: 2.4
Name: generic-api-client
Version: 1.0.0
Summary: Interact with APIs through methods and Pydantic models.
License-File: LICENSE
Keywords: open,api,client,generic,rest
Author: Alexi Desvignes Nouvel
Requires-Python: >=3.10
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: docker (>=7.1.0,<8.0.0)
Requires-Dist: expiring-dict (>=1.1.2,<2.0.0)
Requires-Dist: jinja2 (>=3.1.6,<4.0.0)
Requires-Dist: pydantic (>=2.11.4,<3.0.0)
Requires-Dist: redis (>=7.1.0,<8.0.0)
Requires-Dist: requests (>=2.33.0,<3.0.0)
Requires-Dist: semver (>=3.0.4,<4.0.0)
Requires-Dist: treelib (>=1.8.0,<2.0.0)
Requires-Dist: urllib3 (>=2.6.3,<3.0.0)
Project-URL: Documentation, https://github.com/AlexiDN/generic-api-client
Project-URL: Repository, https://github.com/AlexiDN/generic-api-client
Description-Content-Type: text/markdown

# 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

```bash
pip install generic-api-client
```

## Usage

See our [wiki](https://github.com/AlexiDN/generic-api-client/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

