GeoCongo AI — Python SDK & Geospatial Utilities (v0.1.0)
Bibliothèque Python officielle pour GeoCongo AI : accès aux Edge Functions Supabase, traitements d'images satellites et modèles d'IA géospatiaux.
🚀 Modules principaux
geocongoai.geoscientifique_database(ouGeoCongoClient) :- Client SDK officiel pour interagir avec les Edge Functions Supabase :
- Agent RAG (
/rag-agent) : synthèses et réponses documentées avec citations. - Recherche Documentaire (
/search-documents) : recherche sémantique avec filtres (domaine, catégorie, province). - Recherche Géologique Multimodale (
/search-geological) : recherche vectorielle (1536D) à travers roches, cartes, jeux de données et documents.
- Agent RAG (
- Client SDK officiel pour interagir avec les Edge Functions Supabase :
geocongoai.vision:generate_qr: génération de QR codes.remove_background: détourage d'image viarembg.pansharpen_brovey: fusion d'images multispectrales et panchromatiques (Brovey method).
geocongoai.ia:PrithviClient: wrapper pour les modèles d'IA géospatiaux Prithvi v2 viaterratorch.AlphaEarthClient: wrapper pour l'échantillonnage de pixels via Google Earth Engine (GEE).
geocongoai.gundua_engine:analyse_deterministe: calculs d'indices spectraux (NDVI, NDWI) et analyse par règles.analyse_ia_fondation&traiter_image_satellite.
🛠️ Installation
# Installation de base avec le SDK Edge Functions
python -m pip install -e .
# Optionnel : support Vision (Pansharpening, QR, Rembg)
python -m pip install -e .[vision]
# Optionnel : support IA (Prithvi, PyTorch, Earth Engine)
python -m pip install -e .[ia]
💻 Exemple d'utilisation rapide du SDK
from geocongoai import GeoCongoClient
from geocongoai.exceptions import InsufficientBalanceError
# Initialisation du client avec la clé Supabase
client = GeoCongoClient(api_key="VOTRE_SUPABASE_ANON_KEY")
# 1. Poser une question à l'Agent RAG
try:
response = client.ask_rag(
query="Quels sont les indices de cobalt dans le Lualaba ?",
user_id="123e4567-e89b-12d3-a456-426614174000"
)
print("Réponse :", response.answer)
print("Sources :", response.sources)
except InsufficientBalanceError:
print("Veuillez recharger votre solde unités.")
# 2. Recherche documentaire filtrée
docs = client.search_documents(
query="cuivre et cobalt",
domain="Mines",
category="Thèse",
province="Lualaba"
)
print(f"Trouvé {docs.total_found} documents.")
# 3. Rechercher des échantillons de roches ou cartes
results = client.search_geological(
query="kimberlite diamant",
type="rocks",
province="Kasaï"
)
for item in results.results:
print(f"[{item.item_type}] {item.title} (Score: {item.similarity})")
Voir les guides détaillés dans le dossier docs/.
📦 Publication sur TestPyPI & PyPI
1. Build & Vérification du Package
# Nettoyage et construction des distributions (whl et sdist)
rm -rf dist/ build/ src/*.egg-info geocongoai.egg-info
python -m build
python -m twine check dist/*
2. 🧪 Publication de Test sur TestPyPI
python -m twine upload --repository testpypi dist/*
- Nom d'utilisateur :
__token__ - Mot de passe : (votre jeton TestPyPI
pypi-...)
Test d'installation depuis TestPyPI :
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple geocongoai
3. 🚀 Publication Officielle sur PyPI
python -m twine upload dist/*
- Nom d'utilisateur :
__token__ - Mot de passe : (votre jeton PyPI officiel
pypi-...)
Installation publique directe :
pip install geocongoai
💡 Option automatique (~/.pypirc)
Si vous préférez enregistrer vos jetons pour ne pas les retaper à chaque release, vous pouvez créer le fichier ~/.pypirc avec la structure suivante :
[distutils]
index-servers =
pypi
testpypi
[pypi]
username = __token__
password = pypi-VOTRE_TOKEN_OFFICIEL
[testpypi]
repository = https://test.pypi.org/legacy/
username = __token__
password = pypi-VOTRE_TOKEN_TESTPYPI
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 geocongoai-0.1.2.tar.gz.
File metadata
- Download URL: geocongoai-0.1.2.tar.gz
- Upload date:
- Size: 31.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6889791fc13d195e0809f24060a9092030f31b2e409cddfc43fed5aebfb22aa
|
|
| MD5 |
311541f764b74f862888b2825e67bde1
|
|
| BLAKE2b-256 |
b9b67fed3be866c5e542466aee89b81c13ae3325f7747f5b067ca84a75a38ab7
|
File details
Details for the file geocongoai-0.1.2-py3-none-any.whl.
File metadata
- Download URL: geocongoai-0.1.2-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f8c92911b409c078584c9e88d286f066b2ccf94eacf13e6894088009253ee2e
|
|
| MD5 |
af5dce2c6749f0e03f4ce1e9a8926d8d
|
|
| BLAKE2b-256 |
4b28cebeb7252b17fba36c576e90619c9d6b177d8dc39c49488016b6cee36942
|