SpatialFlow Python SDK
The official Python SDK for SpatialFlow - a real-time geospatial automation platform.
Installation
pip install spatialflow
Development Installation
cd sdks/python
pip install -e ".[dev]"
Quick Start
import asyncio
from spatialflow import SpatialFlow
async def main():
async with SpatialFlow(api_key="sf_xxx") as client:
# List geofences
response = await client.geofences.list()
for geofence in response.geofences:
print(f"{geofence.name}: {geofence.id}")
# Get workspace usage
usage = await client.workspaces.get_usage()
print(f"Event units: {usage.event_units}")
asyncio.run(main())
Supported Resources
| Resource | Methods | Description |
|---|---|---|
| Geofences | CRUD, upload, bulk | Manage geofence boundaries |
| Workflows | CRUD, execute, monitor, versioning | Automation workflows |
| Webhooks | CRUD, deliveries, DLQ, metrics | Webhook endpoints and delivery tracking |
| Devices | CRUD, location updates | Device management |
| Account | profile, API keys, metrics, onboarding | User account management |
| Workspaces | get, update, usage | Workspace settings and usage metrics |
| Locations | ingest, batch, stats | Public location ingestion API |
| Integrations | CRUD, test | Third-party service connections |
| Storage | presigned URLs, files | File upload and management |
Features
- Fully async with
aiohttp - Automatic retry with exponential backoff
- Pagination helpers
- Webhook signature verification
- Workflow builders for common patterns
- File upload with streaming (memory efficient)
Error Handling
from spatialflow import SpatialFlow, NotFoundError, ValidationError
async with SpatialFlow(api_key="sf_xxx") as client:
try:
geofence = await client.geofences.get("invalid-id")
except NotFoundError as e:
print(f"Geofence not found: {e}")
except ValidationError as e:
print(f"Invalid request: {e.errors}")
Raw API Access
For advanced use cases, access the generated API clients directly:
async with SpatialFlow(api_key="sf_xxx") as client:
# Use raw generated API
response = await client.raw.geofences.apps_geofences_api_list_geofences()
Available via client.raw:
geofences,workflows,webhooks,devices,storage,locations,integrations,workspaces,account(also wrapped)authentication,admin,billing,subscriptions,tiles(raw only)
Alpha Notice: This SDK is in alpha (v0.2.0). Some generated APIs (email, system, gpx_simulator, public, default, e2e_test) are not yet exposed. Use the generated client directly for those.
Documentation
Full documentation: docs.spatialflow.io/sdks/python
License
MIT
Metadata
Release files for spatialflow 1.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 | |
|---|---|---|---|
| spatialflow-1.1.0.tar.gz | 233.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spatialflow-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 872.0 kB
Release files / spatialflow-1.1.0.tar.gz
| Download URL | spatialflow-1.1.0.tar.gz |
|---|---|
| Size | 233.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f83e73b8d279c7822a058c83de1f7ae621f617eb2e8e375e97d136005712caa
|
|
BLAKE2b-256 checksum How to use checksums |
174217e757a27e58cd091c7bfb36e3cbc0c3aed65f60729d62fe08bbd63b695e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Apr 5, 2026.
Transparency logRelease files / spatialflow-1.1.0-py3-none-any.whl
| Download URL | spatialflow-1.1.0-py3-none-any.whl |
|---|---|
| Size | 638.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
911e4058d659a674d5a17fcb197d53a73c83ba6985182605dafea6abd972d43f
|
|
BLAKE2b-256 checksum How to use checksums |
c28cec3da469f0fd73cee78e54c684f5f401d4d18d1e281c4ae03ba0c69250a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Apr 5, 2026.
Transparency log