Official Python client for the Geopera geospatial data platform
Project description
Geopera SDK (Python)
The official Python client for the Geopera geospatial data platform — satellite tasking & archive ordering, catalog search, the data platform, billing, and more. Every capability is a typed operation; this SDK gives you a fully typed, sync and async client for all of them.
- Typed end-to-end — every operation has typed inputs, outputs, and errors (
py.typedshipped). - Sync & async — call any operation with
.sync()orawait .asyncio(). - Auth your way — a Geopera API key, or an OAuth bearer token from sign-in.
- Generated from the live OpenAPI, so it never drifts from the API.
Install
pip install geopera
Requires Python 3.11+.
Quickstart
from geopera import AuthenticatedClient
from geopera.api.operations import catalog_search
from geopera.models import CatalogSearchInput
client = AuthenticatedClient(
base_url="https://api.geopera.com",
token="gpra_...", # your Geopera API key
)
result = catalog_search.sync(
client=client,
body=CatalogSearchInput(
host_name="api.geopera.com",
collections=["sentinel-2-l2a"],
limit=10,
),
)
print(result) # -> CatalogSearchOutput (typed)
Every operation lives under geopera.api.operations.<operation_id> (dots become underscores —
e.g. orders.tasking.estimate → orders_tasking_estimate). Request/response models are in
geopera.models. Browse the full operation reference at https://docs.geopera.com/api-reference.
Authentication
Pass either credential as token; Geopera accepts both and runs every call as that principal
(with its scopes, audit, and provenance):
# 1) A Geopera API key (headless / server-to-server) — create one in the portal.
client = AuthenticatedClient(base_url="https://api.geopera.com", token="gpra_...")
# 2) An OAuth bearer token (e.g. from a signed-in user session).
client = AuthenticatedClient(base_url="https://api.geopera.com", token=user_access_token)
Async
import asyncio
from geopera import AuthenticatedClient
from geopera.api.operations import orders_tasking_estimate
from geopera.models import TaskingEstimateInput
async def main():
async with AuthenticatedClient(base_url="https://api.geopera.com", token="gpra_...") as client:
est = await orders_tasking_estimate.asyncio(
client=client,
body=TaskingEstimateInput(...),
)
print(est)
asyncio.run(main())
Error handling
Operations return either the typed success model or a typed error — Problem (RFC 9457
problem+json, what Geopera returns for business/permission errors) or HTTPValidationError
(422 input validation). Use the *_detailed variant when you need the HTTP status code:
from geopera.api.operations import catalog_search
from geopera.models import CatalogSearchInput, Problem
resp = catalog_search.sync_detailed(client=client, body=CatalogSearchInput(...))
if resp.status_code == 200:
data = resp.parsed # CatalogSearchOutput
elif isinstance(resp.parsed, Problem):
print("geopera error:", resp.parsed.title, resp.parsed.detail)
Configuration
AuthenticatedClient accepts the usual knobs (timeouts, retries via httpx, custom headers,
TLS verification):
client = AuthenticatedClient(
base_url="https://api.geopera.com",
token="gpra_...",
timeout=httpx.Timeout(30.0),
raise_on_unexpected_status=True,
headers={"X-Request-Source": "my-app"},
)
Versioning
The SDK version tracks the Geopera API contract. Breaking API changes bump the major version. See the changelog.
Links
- 📚 API reference: https://docs.geopera.com/api-reference
- 🌐 Geopera: https://geopera.com
- 🐍 PyPI: https://pypi.org/project/geopera/
License
MIT © Geopera
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 geopera-2.1.0.tar.gz.
File metadata
- Download URL: geopera-2.1.0.tar.gz
- Upload date:
- Size: 119.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27ba97c79789437af329b2b932193aeec5cf9e768a2e9d30fa625556956d3254
|
|
| MD5 |
e8b9ad39ec04fba976dd91c490e8b808
|
|
| BLAKE2b-256 |
a03550111039d3eec08d02ef7a54638292d7d36a540687847396e6f90d882e68
|
Provenance
The following attestation bundles were made for geopera-2.1.0.tar.gz:
Publisher:
publish.yml on geo-pera/geopera-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
geopera-2.1.0.tar.gz -
Subject digest:
27ba97c79789437af329b2b932193aeec5cf9e768a2e9d30fa625556956d3254 - Sigstore transparency entry: 1883386976
- Sigstore integration time:
-
Permalink:
geo-pera/geopera-python@3f69ddb56996f6655e23d58c8c4b20dd1821bf6d -
Branch / Tag:
refs/tags/v2.1.0 - Owner: https://github.com/geo-pera
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3f69ddb56996f6655e23d58c8c4b20dd1821bf6d -
Trigger Event:
push
-
Statement type:
File details
Details for the file geopera-2.1.0-py3-none-any.whl.
File metadata
- Download URL: geopera-2.1.0-py3-none-any.whl
- Upload date:
- Size: 587.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecd4755aa0aaa5707addfe7cda2c3d3ff53466fd48def4c70fbcf61ba43b09b2
|
|
| MD5 |
f94e35dff6496552d072d38357692512
|
|
| BLAKE2b-256 |
53be9220bd767f5a6f844f476ee3414b479910bd837153f0fc1753dee2da8f7e
|
Provenance
The following attestation bundles were made for geopera-2.1.0-py3-none-any.whl:
Publisher:
publish.yml on geo-pera/geopera-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
geopera-2.1.0-py3-none-any.whl -
Subject digest:
ecd4755aa0aaa5707addfe7cda2c3d3ff53466fd48def4c70fbcf61ba43b09b2 - Sigstore transparency entry: 1883387114
- Sigstore integration time:
-
Permalink:
geo-pera/geopera-python@3f69ddb56996f6655e23d58c8c4b20dd1821bf6d -
Branch / Tag:
refs/tags/v2.1.0 - Owner: https://github.com/geo-pera
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3f69ddb56996f6655e23d58c8c4b20dd1821bf6d -
Trigger Event:
push
-
Statement type: