Skip to main content

A Python client for interacting with Mathis LAMBERT's API

Project description

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 :

pip install ml_api_client

Utilisation

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

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.
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 pour plus de détails.

Contact

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ml_api_client-0.3.2.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ml_api_client-0.3.2-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file ml_api_client-0.3.2.tar.gz.

File metadata

  • Download URL: ml_api_client-0.3.2.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ml_api_client-0.3.2.tar.gz
Algorithm Hash digest
SHA256 454244bfdd6da3e3dfa40eea8dfc3e54871de608ba0e9b1aad98a54a87b6504f
MD5 c995fa8739b168034171eed1ac864155
BLAKE2b-256 440fc53deb39c31735be39bb5ea122ffddd45a6fcd45cbf9a9acdfa5ff7ee143

See more details on using hashes here.

File details

Details for the file ml_api_client-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: ml_api_client-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ml_api_client-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 65ba2bd22ab6fb76c28f2c6b72f7e45ee43eba0768a0e3edfbd9ab5e461cda1f
MD5 40cee30ce97f7c48fb8d605f7fa88e10
BLAKE2b-256 a932a35dd57153285bb9f2dacff1d73cfc5501107667c256b7dbe29111d1ea3c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page