Skip to main content

aiogeodrops

Async Python client for GeoDrops soil-probe readings.

GeoDrops publishes every probe's readings to a public Google BigQuery table. This library queries it over BigQuery's REST API with a Google service account. It is built on aiohttp and PyJWT only (no Google Cloud SDK, no gRPC), takes your aiohttp.ClientSession, and is fully typed.

It is the library behind the GeoDrops Home Assistant integration.

Install

pip install aiogeodrops

Prerequisites

A Google Cloud project of your own (queries run and are billed there, well within BigQuery's free tier for a handful of probes), with the BigQuery API enabled, and a service account that has BigQuery Job User on that project. Download a JSON key for the service account.

Usage

import asyncio
from pathlib import Path

import aiohttp

from aiogeodrops import GeoDropsClient


async def main() -> None:
    key = Path("service-account.json").read_text()
    async with aiohttp.ClientSession() as session:
        client = GeoDropsClient(session, "my-gcp-project", key)

        await client.validate_access()

        # Find a probe's device id from the serial shown in the GeoDrops app.
        reading = await client.lookup_serial("AAA111", lookback_hours=12)
        if reading is None:
            print("No reading in the last 12 hours")
            return

        latest = await client.fetch_latest([reading.device_id], lookback_hours=12)
        probe = latest[reading.device_id]
        print(probe.moisture_pct, probe.temp_surface, probe.read_at)


asyncio.run(main())

fetch_latest makes one query for all the device ids you pass. Each query gives up after 60 seconds (query_timeout= to change).

Errors

All errors derive from GeoDropsError:

Exception Meaning What to do
GeoDropsCredentialsError The key isn't a usable service-account key Fix the key; raised by the constructor
GeoDropsAuthError Google rejected the key (deleted, revoked, account disabled) Create a new key
GeoDropsAccessDeniedError 403: missing BigQuery Job User role, or BigQuery API not enabled Fix it in Google Cloud; then retry
GeoDropsQueryError BigQuery rejected the query (parent of GeoDropsAccessDeniedError) Check the project id
GeoDropsConnectionError Network error, timeout, Google outage, rate or quota limit Retry later

Development

pip install -e ".[dev]"
ruff check . && ruff format --check .
mypy
pytest --cov=aiogeodrops

Releases are published to PyPI by GitHub Actions when a GitHub release is published, using PyPI trusted publishing (no stored token) with attestations.

License

MIT

Metadata

Release files for aiogeodrops 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiogeodrops 0.1.1
File Size Uploaded Provenance
aiogeodrops-0.1.1.tar.gz 19.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aiogeodrops 0.1.1
File Interpreter ABI Platform
aiogeodrops-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 32.3 kB

Release files / aiogeodrops-0.1.1.tar.gz

Download URL aiogeodrops-0.1.1.tar.gz
Size 19.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5c88619efe76d1c113c0214ba98a5d10f3d21c3fa5f5477599ceca9470d0afa5
BLAKE2b-256 checksum
How to use checksums
605f887262d4c1deef1fe109962d52c4a8151c5fe27614acd7281bada9c588c5
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 29, 2026.

Transparency log

Release files / aiogeodrops-0.1.1-py3-none-any.whl

Download URL aiogeodrops-0.1.1-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31df053e2bc485b8f2957ff67ffda43282874811e30aa408686502625816abe9
BLAKE2b-256 checksum
How to use checksums
0c933c957979aa6ec324f572eaa1af7149e2aab1591a03428376b793a8bfb47c
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 29, 2026.

Transparency log

Security for aiogeodrops 0.1.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aiogeodrops-0.1.1.tar.gz

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 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page