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.3.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.3-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: thorcast_api_client-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 fd89fdd5262479e5a4021b8bf90aa48d17c6c00f9e04ad0b0f065152d5ad60b3
MD5 07d980417e419b3e97df678feca8ece1
BLAKE2b-256 5c30b1e136792a4af0234a376b21cde4cf6fda7d49ed7c37ee37957bb5c773f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for thorcast_api_client-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3068da6395dd8e3fe79e265cc3045a9c732735656852ac40dacf49d65d8762e7
MD5 dc2d3d0ebecabdadb4bd372494930541
BLAKE2b-256 c7da48f62a628dba56205c69b8b453ef618929477783f9ed8b69ae9ce1e4a66d

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