Skip to main content

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, groups Manage geofence boundaries
Workflows CRUD, execute, monitor, versioning Automation workflows
Webhooks CRUD, deliveries, DLQ, metrics Webhook endpoints and delivery tracking
Devices CRUD, location updates, shifts, sessions Device management
Account profile, API keys, metrics User account management
Workspaces get, update, usage, members, invitations 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)

Some generated APIs (email, system, gpx_simulator, public, default, e2e_test) are not exposed on the client. Use the generated client directly for those.

Documentation

Full documentation: docs.spatialflow.io/sdks/python

License

MIT

Metadata

Release files for spatialflow 2.0.0

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

Source distribution (sdist)

Source distribution for spatialflow 2.0.0
File Size Uploaded Provenance Actions
spatialflow-2.0.0.tar.gz 324.5 kB With provenance Details for spatialflow-2.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.3 MB

Release files / spatialflow-2.0.0.tar.gz

Download URL spatialflow-2.0.0.tar.gz
Size 324.5 kB
Tags Source
SHA-256 checksum
How to use checksums
43ecb4dde9aa2488875049b2ba09d3a2f68c23305893635ca005df2167795dfe
BLAKE2b-256 checksum
How to use checksums
72e1b6c1a7325bb310f3667e6fbe0632d35b0d2480b351c73a3fc0a7d5c4293e
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 Oct 8, 2026.

Transparency log

Release files / spatialflow-2.0.0-py3-none-any.whl

Download URL spatialflow-2.0.0-py3-none-any.whl
Size 948.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26bdd97c10db53dc741c9b209baad318ce6691c616e5330dbcac6aede21848d9
BLAKE2b-256 checksum
How to use checksums
5918efabb850f24d6e66183d4f83a1953b0cbfac3514425dae978b98879ff7d7
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 Oct 8, 2026.

Transparency log

Security for spatialflow 2.0.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for spatialflow-2.0.0.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 Oct 8, 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