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

Uploaded Python 3

File details

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

File metadata

  • Download URL: thorcast_api_client-0.1.4.2.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.2.tar.gz
Algorithm Hash digest
SHA256 bdf06ab50073374c2213ec1ef34545f2a4ab09dd5615afb57346fe2bd7464dc8
MD5 81c241e3542d0aae4c22cf8db8bb4eb8
BLAKE2b-256 6304541f6b4867fdaf4de49a720cef6cce9672af5c1d3ecb27f07b5c2ce0e4e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for thorcast_api_client-0.1.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c85fceb581e64c214a0b89c0eda10472f10950ed0a09934ee55c5c81a39276da
MD5 240daa9bf12ccd3597c867c1b1e9a1af
BLAKE2b-256 3c4bf3da9e8d182c9d41a3586126078555e47a222b0a3d74b36776de02805a9a

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