Metadata-Version: 2.4
Name: ml_api_client
Version: 0.3.2
Summary: A Python client for interacting with Mathis LAMBERT's API
Author-email: Mathis LAMBERT <mathislambert.dev@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Mathis
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/mathis-lambert/ml_api_client
Project-URL: Repository, https://github.com/mathis-lambert/ml_api_client
Project-URL: Issues, https://github.com/mathis-lambert/ml_api_client/issues
Keywords: api,client,llm,chat,embeddings,vector,openai-compatible
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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: Operating System :: OS Independent
Classifier: Typing :: Typed
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.11.12
Requires-Dist: pydantic>=2.10.6
Requires-Dist: openai
Provides-Extra: dev
Requires-Dist: fastapi[standard]>=0.115.8; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: python-dotenv; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# API Client

`ml_api_client` est une bibliothèque Python conçue pour faciliter l'interaction avec l'API de Mathis LAMBERT. Elle
utilise `aiohttp` pour gérer les requêtes HTTP de manière asynchrone, ce qui la rend idéale pour les applications
nécessitant des performances élevées et une gestion efficace des connexions simultanées.

## Fonctionnalités

- **Connexion asynchrone** : Utilise `aiohttp` pour des requêtes HTTP non bloquantes.
- **Facile à utiliser** : API simple et intuitive pour une intégration rapide dans vos projets.
- **Authentification sécurisée** : Supporte l'authentification par jeton et clé API.
- **Gestion des sessions** : Support des cookies et des en-têtes personnalisés.
- **Modèles Pydantic** : Utilisation de modèles Pydantic pour la validation et la gestion des données.

## Installation

Pour installer `ml_api_client`, utilisez pip :

```bash
pip install ml_api_client
```

## Utilisation

Voici un exemple de base pour utiliser `ml_api_client` dans votre projet :

```python
import asyncio
from ml_api_client import APIClient


async def main():
    # Initialisez le client avec l'URL de base de votre API
    client = APIClient(api_key="your_api_key")

    # Effectuez une requête de connexion asynchrone
    response = await client.auth.login(username="your_username", password="your_password")
    print(response)


# Exécutez la fonction principale
asyncio.run(main())
```

## Configuration

Vous pouvez configurer `APIClient` avec différentes options :

- `base_url` : L'URL de base de votre API.
- `api_key` : Clé API pour l'authentification.
- `headers` : En-têtes HTTP personnalisés.
- `timeout` : Délai d'attente pour les requêtes.

```python
client = APIClient(
    base_url="https://api.mathislambert.fr/v1",
    api_key="your_api_key",
    headers={"Authorization": "Bearer YOUR_TOKEN"},
    timeout=10
)
```

## Contribution

Les contributions sont les bienvenues ! Pour contribuer :

1. Forkez le dépôt.
2. Créez une branche pour votre fonctionnalité (`git checkout -b feature/new-feature`).
3. Commitez vos modifications (`git commit -am 'Add new feature'`).
4. Poussez vers la branche (`git push origin feature/new-feature`).
5. Ouvrez une Pull Request.

## Licence

Ce projet est sous licence MIT. Voir le fichier [LICENSE](LICENSE) pour plus de détails.

## Contact

Pour toute question ou suggestion, n'hésitez pas à ouvrir une issue ou à contacter l'auteur :

- **Mathis LAMBERT** : mathislambert.dev@gmail.com
