Skip to main content

spear-ai-horizon-sdk (Python bindings)

Python bindings for the Horizon Rust SDK, the data access layer for the Horizon tactical data platform. The bindings are built with PyO3 and maturin, and expose the SDK's PostgreSQL, Kafka, and Apache Iceberg data paths to Python callers.

The distribution is named spear-ai-horizon-sdk. The PyO3 extension is horizon_sdk. The generated GraphQL client is horizon_graphql.

Installation

pip install spear-ai-horizon-sdk

Wheels are published for aarch64 Linux and for both arm64 and x86_64 macOS. The bindings use the CPython stable ABI (abi3), so a single wheel per platform supports Python 3.11 and newer. On other platforms, build from source with a Rust toolchain (see the repository for details).

Usage

import horizon_sdk
from horizon_graphql import Client, CreateDataCollectionInput, DataCollectionInput

with Client(
    url=f"{base_url}/api/graphql",
    headers={"Authorization": f"Bearer {api_key}"},
) as client:
    result = client.create_data_collection(
        CreateDataCollectionInput(
            data_collection=DataCollectionInput(
                name="Example collection",
                platform=platform_node_id,
            )
        )
    )

collection = result.create_data_collection.data_collection

GraphQL model

horizon_graphql is generated from the Horizon GraphQL schema and the operation documents in crates/horizon-sdk/graphql. The generated modules live in horizon_graphql/generated. Regenerate them after a schema or operation change:

pnpm --filter @spear-ai/horizon-sdk-codegen graphql:python

Development

This package lives in the Horizon monorepo at packages/horizon-sdk/crates/horizon-ffi-python. The Rust crate it wraps is at packages/horizon-sdk/crates/horizon-sdk.

Horizon API integration tests are documented in tests/README.md. That includes the CRUD harness and how to add other live tests.

Metadata

Release files for spear-ai-horizon-sdk 28.0.0

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

Built distributions (wheels)

Table of built distributions (wheels) for spear-ai-horizon-sdk 28.0.0
File Interpreter ABI Platform Actions
spear_ai_horizon_sdk-28.0.0-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for spear_ai_horizon_sdk-28.0.0-cp311-abi3-manylinux_2_28_x86_64.whl
spear_ai_horizon_sdk-28.0.0-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details for spear_ai_horizon_sdk-28.0.0-cp311-abi3-manylinux_2_28_aarch64.whl
spear_ai_horizon_sdk-28.0.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for spear_ai_horizon_sdk-28.0.0-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 35.1 MB

Release files / spear_ai_horizon_sdk-28.0.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL spear_ai_horizon_sdk-28.0.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 12.2 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
f150377bd9a2e7c99c0e13101bfd510fa4102c7bfd08c88ba8d20fd27c847f0c
BLAKE2b-256 checksum
How to use checksums
0d7d5b29eb4c4515f9065bf490ce21592bfe89e059cccb1e981fa736e4db76cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / spear_ai_horizon_sdk-28.0.0-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL spear_ai_horizon_sdk-28.0.0-cp311-abi3-manylinux_2_28_aarch64.whl
Size 12.2 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
ae0e4c2ff66c5ab0ef53e09cee05b3d3dcb905861d2c31593f7ffe7db652e09c
BLAKE2b-256 checksum
How to use checksums
fd3bfa7bbe034a59a047a98d715a6f3aec8447bda529053d5ee528938cda8f02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / spear_ai_horizon_sdk-28.0.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL spear_ai_horizon_sdk-28.0.0-cp311-abi3-macosx_11_0_arm64.whl
Size 10.6 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
35359cb4e2f91cb689d74ca102df070c70b77ccb902c625248efdef7253441e6
BLAKE2b-256 checksum
How to use checksums
a85f3d2838b0616207b43ba6f5b41fbd6f861a9ced56f3e5d1a08980cbae59f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for spear-ai-horizon-sdk 28.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

28.0.0 This release

3 release files No provenance

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