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.1.0.tar.gz (13.7 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.1.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ml_api_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0943c1c4ab353567615f978af0b02bc83fcb3adc0561d77ff1756de92f29e3cf
MD5 9ba8973c8bc531917f683e47358563ea
BLAKE2b-256 07aaf91b539412a1ccb38e38584ddc268797457fd3056cb0a0783a8bef31dc4a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ml_api_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5b7034f803dc2db3ed329beda08aa131cccf45d526a246e08bc7714287de04f
MD5 b9ecff0d80ab92aa57bdd8596f8c2b58
BLAKE2b-256 7d7e88a2d69391bb85cb769b4561838d898251cf5e5eb1a6f92594688e941ad5

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