SDK Python pour l'API GroundedWeb
Project description
pygroundedweb
Client Python pour l'API Grounded Web.
Ce module fournit une interface orientée objet pour interagir avec l'API Grounded Web, permettant la gestion des datasets, la configuration des outils de photogrammétrie (MicMac, CCTag) et le lancement d'analyses.
Compatibilité
[!IMPORTANT] Cette version de
pygroundedwebest strictement liée aux versions de l'API Grounded Web pour garantir la cohérence des schémas de données (Pydantic) et des endpoints API.
| PyGroundedWeb | API Grounded Web (Backend) | Statut |
|---|---|---|
| v1.0.x | v2.x.x | Supporté |
Pour vérifier la version de votre instance API, vous pouvez consulter le point d'entrée /api/ de votre api.
Installation
Via pip
pip install pygroundedweb
Depuis les sources
Pour le développement local :
git clone https://github.com/Norman-Francois/pygroundedweb.git
cd pygroundedweb
pip install -e .
Prérequis
- Python 3.9+
- requests
- pydantic >= 2.0
Utilisation
La bibliothèque expose un client principal GroundedWebClient et des modèles de données typés.
Exemple d'utilisation
from pygroundedweb import *
# 1. Initialisation et authentification
client = GroundedWebClient(base_url="http://localhost:8000")
client.login(email="admin@example.com", password="password")
# 2. Récupération d'un dataset existant
dataset = client.dataset.retrieve(1)
# 3. Définition d'une configuration
config = Configuration(
name="ConfigTest",
scale_bars= [
ScaleBar(start=0, end=1, length=.22),
ScaleBar(start=2, end=3, length=.22),
ScaleBar(start=4, end=5, length=.22),
ScaleBar(start=6, end=7, length=.22)],
detector= CCTag(),
cloud_processor= CloudCompare(),
sfm= MicMac(
distorsion_model=DistortionModel.FRASER_BASIC,
zoom_final=ZoomFinal.QUICK_MAC,
tapioca_mode=TapiocaMode.ALL,
tapioca_resolution=2000,
tapioca_second_resolution=1000
)
)
# 4. Lancement de l'analyse (exemple)
analysis = client.analysis.create(
analysis_name="Analyse 01",
configuration=config,
dataset=dataset,
notify_by_email=True
)
print(f"Analyse créée : ID {analysis.pk} - Statut : {analysis.status}")
# 5. Rafraîchir le statut de l'analyse depuis l'API
analysis.refresh()
# 6. Afficher l'analyse une fois rafraîchie
print(f"Analyse ID {analysis.pk} - Statut actuel : {analysis.status}")
Documentation
La documentation complète est générée avec Sphinx et se trouve dans le dossier docs/.
Pour installer les dépendances nécessaires à la génération de la documentation :
pip install -r requirements.txt
Pour générer la documentation HTML localement :
cd docs
make html
# Le HTML sera généré dans docs/_build/html
Pour un rechargement automatique pendant le développement (optionnel) :
pip install sphinx-autobuild
cd docs
sphinx-autobuild . _build/html
Structure du projet
client: Gestion des requêtes HTTP et des endpoints API.models: Définitions Pydantic des objets métier (Analysis, Dataset, Configuration).
Build
Pour générer le fichier wheel (.whl) pour la distribution :
pip install build
python3 -m build
Développeur
Ce projet est développé et maintenu par :
[!TIP] Si vous souhaitez contribuer au projet ou signaler un bug, n'hésitez pas à ouvrir une Issue ou une Pull Request sur le dépôt officiel.
Licence
Ce projet est sous licence GNU GPL v3.
- Utilisation commerciale : Autorisée.
- Modification : Autorisée, mais le code source modifié doit être redistribué sous la même licence (GPL v3).
- Citation : Vous devez créditer l'auteur original et indiquer si des modifications ont été apportées.
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 pygroundedweb-1.0.0.tar.gz.
File metadata
- Download URL: pygroundedweb-1.0.0.tar.gz
- Upload date:
- Size: 32.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99524c17eb2816465fc8dcd3088da6a365cb63ca056cc323c07c8899141af931
|
|
| MD5 |
fe0f06449f4de622aaac02ff681f2071
|
|
| BLAKE2b-256 |
19e6c8f4edee9a59072629239fe25daf182da267eb613895b1742dfbb175b7a7
|
Provenance
The following attestation bundles were made for pygroundedweb-1.0.0.tar.gz:
Publisher:
publish-pypi.yml on Norman-Francois/pygroundedweb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pygroundedweb-1.0.0.tar.gz -
Subject digest:
99524c17eb2816465fc8dcd3088da6a365cb63ca056cc323c07c8899141af931 - Sigstore transparency entry: 976717041
- Sigstore integration time:
-
Permalink:
Norman-Francois/pygroundedweb@75bf3ff1665635a8b48ce2f1ae85455a62b9d6a4 -
Branch / Tag:
- Owner: https://github.com/Norman-Francois
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@75bf3ff1665635a8b48ce2f1ae85455a62b9d6a4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pygroundedweb-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pygroundedweb-1.0.0-py3-none-any.whl
- Upload date:
- Size: 39.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f2d6a5de1b5b4cd4fc55b75e97a379d1051d96aaa5e13bf541530ecc75cb13d
|
|
| MD5 |
e8c76f54c465e0a57ea97a710c9b206e
|
|
| BLAKE2b-256 |
e4ec2e9183508a99b523d84fb23a3c1c0aaddbc294fa26c9ea7a7830f29601d6
|
Provenance
The following attestation bundles were made for pygroundedweb-1.0.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on Norman-Francois/pygroundedweb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pygroundedweb-1.0.0-py3-none-any.whl -
Subject digest:
2f2d6a5de1b5b4cd4fc55b75e97a379d1051d96aaa5e13bf541530ecc75cb13d - Sigstore transparency entry: 976717044
- Sigstore integration time:
-
Permalink:
Norman-Francois/pygroundedweb@75bf3ff1665635a8b48ce2f1ae85455a62b9d6a4 -
Branch / Tag:
- Owner: https://github.com/Norman-Francois
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@75bf3ff1665635a8b48ce2f1ae85455a62b9d6a4 -
Trigger Event:
release
-
Statement type: