SDK Python officiel pour l'API ThibEquation - Calcul de scores d'anomalie et conversions astronomiques
Project description
Calcul de scores d'anomalie et conversions astronomiques
⚠️ AVERTISSEMENT BÊTA
Cette API est en version bêta. Ne l'utilisez PAS pour des applications cliniques, critiques ou de sécurité.
Usage recommandé : Recherche et expérimentation uniquement.
Installation
pip install thibeq-sdk
Démarrage rapide
from thibeq_sdk import ThibEqClient
# Initialiser le client
client = ThibEqClient(
base_url="http://api.thibequation.com",
api_key="your-api-key"
)
# Calculer un score ThibEquation
result = client.score(
G=0.6, # Facteur Géométrique/Physique
K=0.7, # Facteur Contextuel
S=0.4, # Facteur Documentation
C=0.5 # Coefficient Fiabilité Témoin
)
print(f"ThibScore: {result['thibscore']}")
# Convertir des coordonnées astronomiques
coords = client.convert(
lat=46.03,
lon=-73.11,
utc="2025-11-03T21:15:00Z",
az=257.3,
alt=42.1
)
print(f"RA: {coords['ra_h']}h, Dec: {coords['dec_deg']}°")
Fonctionnalités
Calcul de Score ThibEquation
La formule ThibEquation quantifie l'anomalie d'une observation :
ThibScore = (G × w_G + K × w_K + S × w_S) × C × 100
- G (0-1): Facteur Géométrique/Physique
- K (0-1): Facteur Contextuel
- S (0-1): Facteur Documentation
- C (0-1): Coefficient Fiabilité Témoin
Conversion de Coordonnées
Convertit des coordonnées horizontales (Azimut/Altitude) en coordonnées équatoriales (RA/Dec) avec calcul du Temps Sidéral Local (LST).
Gestion des Erreurs
Le SDK inclut des exceptions personnalisées :
from thibeq_sdk import (
ThibEqError,
ThibEqAuthError,
ThibEqValidationError,
ThibEqNetworkError
)
try:
result = client.score(G=0.6, K=0.7, S=0.4, C=0.5)
except ThibEqAuthError:
print("Authentification échouée")
except ThibEqValidationError as e:
print(f"Paramètres invalides: {e}")
except ThibEqNetworkError as e:
print(f"Erreur réseau: {e}")
Configuration Avancée
client = ThibEqClient(
base_url="http://localhost:5000",
api_key="your-key",
timeout=10.0, # Timeout en secondes (défaut: 5.0)
max_retries=3 # Tentatives en cas d'erreur 502/503 (défaut: 1)
)
Développement
Installation des dépendances de développement
pip install -e ".[dev]"
Tests
# Tests unitaires
pytest
# Tests avec coverage
pytest --cov=thibeq_sdk
# Smoke test (nécessite une API en cours d'exécution)
python test_smoke.py
Linting et formatage
# Vérifier le code
ruff check .
# Formater le code
ruff format .
# Type checking
mypy thibeq_sdk.py
Documentation
- Repository: https://github.com/Thib4204/thibequation-api
- Issues: https://github.com/Thib4204/thibequation-api/issues
Citation
Si vous utilisez ce SDK dans vos recherches, veuillez citer :
Thibodeau, Pascal. (2025). THIBEQUATION – Certificat de complétion 2025 (v4.0). Zenodo.
@software{thibodeau_thibequation_2025,
author = {Thibodeau, Pascal},
title = {THIBEQUATION – Certificat de complétion 2025 (v4.0)},
year = 2025,
publisher = {Zenodo},
doi = {10.5281/zenodo.17510899},
url = {https://doi.org/10.5281/zenodo.17510899}
}
Licence
MIT License - Voir le fichier LICENSE pour plus de détails.
Auteur
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thibeq_sdk-0.1.0.tar.gz.
File metadata
- Download URL: thibeq_sdk-0.1.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21aae9c7386d196c1da659a2641a3fe69e9548bf31f02d12fa7c5f002075b929
|
|
| MD5 |
9a19a0806fb131f91d91fef30772afa9
|
|
| BLAKE2b-256 |
b1aee2e3c9427b83584c8e0f6724fd0ff9980121ae38fa217a6dead3b36713f8
|
File details
Details for the file thibeq_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: thibeq_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69cae9fcb9490ba06ffc224e75745494db9b11205fd489142269b1bcc30c5dbf
|
|
| MD5 |
0ac356d00a887ad68aaaf6703fcd2ae3
|
|
| BLAKE2b-256 |
b311bb1a87eedc641e74bc7d416ee571b1d0f1d118f15c6b02fff8272c658b4f
|