pygeocover
Client Python asynchrone (aiohttp) non officiel pour l'API grand public Decathlon Geocover (plateforme Conneqtech), destiné à l'intégration Home Assistant.
Installation locale
python3 -m pip install --user -e ".[test]"
Ligne de commande
Configuration : geocover.json dans le dossier courant (ou --config, ou $PYGEOCOVER_CONFIG),
créé au premier login et contenant vos jetons. Fichier privé, ignoré par git.
python3 -m pygeocover login # connexion (voir ci-dessous)
python3 -m pygeocover # état : position, batterie, santé, dernier trajet
python3 -m pygeocover rides 10 # 10 derniers trajets
python3 -m pygeocover locations 24 # positions des dernières 24 h
Connexion
Le navigateur s'ouvre sur la connexion Decathlon. À la fin, une page Conneqtech
« Whoops! Looks like something went wrong » s'affiche : c'est voulu. Copiez son adresse
(https://login.ids.conneq.tech/redirect?code=…) et collez-la dans le terminal rapidement.
Explication technique dans auth.py.
Utilisation en Python
import aiohttp
from pygeocover import GeocoverClient, TokenSet
async with aiohttp.ClientSession() as session:
client = GeocoverClient(session,
TokenSet.from_dict(saved), # ou None avant connexion
on_tokens_updated=persist) # OBLIGATOIRE : refresh_token rotatif
# connexion : req = await client.async_start_login(); ouvrir req.url ;
# await client.async_finish_login(req, url_collee)
bikes = await client.async_get_bikes() # position + batterie + odomètre + géofences
| Méthode | Endpoint |
|---|---|
async_get_user() |
GET user/me |
async_get_bikes() / async_get_bike(id) |
GET bike, GET bike/{id} |
async_get_locations(id, start, end) |
GET bike/{id}/location?from=&till= (ISO 8601) |
async_get_battery(id) |
GET bike/{id}/battery/current-state |
async_get_state(id) |
GET bike/{id}/state |
async_get_health(id) |
GET bike/{id}/health |
async_get_geofences(id) |
GET bike/{id}/geofence |
async_get_rides(id, limit, offset) / async_get_latest_ride(id) |
GET v2/bike/{id}/ride |
Exceptions : GeocoverAuthError (reconnexion nécessaire), GeocoverConnectionError
(transitoire), GeocoverApiError, GeocoverLoginError.
Points d'attention
- refresh_token rotatif à usage unique : chaque rafraîchissement l'invalide ; le client appelle
on_tokens_updatedà chaque nouveau jeton, l'appelant doit le persister immédiatement. Un même refresh_token ne doit être utilisé que par un seul programme à la fois. Accept: application/jsonobligatoire (sinon HTTP 406) — géré par le client.- Trajets : tri par
order=start_date;desc(syntaxechamp;senstrouvée dans l'APK, servicen1) ; sans ce paramètre le serveur renvoie du plus ancien au plus récent. Filtres (non utilisés) au formatfilter[]=or;bike_id;eq;<id>. client_id/client_secret: ceux de l'app Android, identiques pour tous ses utilisateurs, inclus par défaut (secret « non confidentiel » au sens de la RFC 8252 §8.5). Surchargeables.
Tests
PYTHONPATH=src python3 -m pytest -q
Metadata
Release files for pygeocover 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pygeocover-0.1.0.tar.gz | 18.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pygeocover-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.1 kB
Release files / pygeocover-0.1.0.tar.gz
| Download URL | pygeocover-0.1.0.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4c7f3754c6cf1c3338eb9812aad76f726c0ae1a087555d8c5734814ed2ecac9
|
|
BLAKE2b-256 checksum How to use checksums |
5023ff234224849884e70b0a1b9c2a9b9fd8d1d7b5d2820a301d93ea866a0f4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logRelease files / pygeocover-0.1.0-py3-none-any.whl
| Download URL | pygeocover-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe296018fb55b6b2cdc9163771e04e39adc5685bc87859af582275186a3d310a
|
|
BLAKE2b-256 checksum How to use checksums |
054243e9dd112ca0e28f33417cb6005fc7a90b2a344520ee2e93c9f3652719bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency log