Skip to main content

Un client Python pour interagir avec l'API ThorCast

Project description

ThorCast API Client V0.1

📌 Description (je suis nul en Markdown , j'espère que ce sera lisible)

thorcast_api_client est un client Python permettant d'interagir avec l'API ThorCast mise en place par Holmium pour MINT.

Il prend en charge (normalement) :

  • L'authentification JWT
  • La récupération des courbes de charge prévues
  • La récupération des courbes de charge historiques
  • La gestion des erreurs API

🚀 Installation

Via pip

pip install thorcast_api_client

Via poetry pour les amateurs de Baudelaire

poetry add thorcast_api_client

📜 Utilisation

🔒 Authentification :

L'authentification passe par la requête d'un token JWS en injectant un MDP/Username :

from thorcast_api_client.client import ThorCastClient

client = ThorCastClient("mon_user", "mon_mdp")

Lister les versions disponibles pour une ou plusieurs courbes LT

versions = client.get_lt_curves_versions(["prm1", "prm2"])
print(versions)

Récupérer les courbes de charge LT

courbes = client.get_lt_curves(["prm1", "prm2"], "2023-01-01T00:00:00Z", "2025-01-01T00:00:00Z")
print(courbes)

Récupérer les versions des courbes de catalogue 🤷 (rien compris à ce que ça remonte)

version_catalogues = client.get_catalog_versions(["catalogue1", "catalogue2"], "2023-01-01T00:00:00Z", "2025-01-01T00:00:00Z")
print(version_catalogues)

Récupérer les courbes de charge historiques

courbes_catalogue = client.get_catalog_curves(["id_catalogue1", "id_catalogue2"])
print(courbes_catalogue)

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

thorcast_api_client-0.1.4.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

thorcast_api_client-0.1.4.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file thorcast_api_client-0.1.4.1.tar.gz.

File metadata

  • Download URL: thorcast_api_client-0.1.4.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.9 Windows/10

File hashes

Hashes for thorcast_api_client-0.1.4.1.tar.gz
Algorithm Hash digest
SHA256 578b57b95226367701c5870be1fa5e8c323c525fa87d4401c8f0db79796a14cf
MD5 8e31d8dfddfd1b9184c359f9d0af2c38
BLAKE2b-256 8cbed1c37a9368732e877167299c6fcbfe902f16d31699eef0285fd13e699341

See more details on using hashes here.

File details

Details for the file thorcast_api_client-0.1.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for thorcast_api_client-0.1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eddd99bc25f2702461324a60bd01c367638f7ab759281c086648ba1be34d970f
MD5 d9acc5485c54c893ba6401482fc65cf5
BLAKE2b-256 ddf88f818a21bb471244e5e5829878e14b23231df900626cedea24e043d6ef55

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