Skip to main content

py-stellar-horizon

A typed Python client for Horizon, the REST API of the Stellar network. It reads from Horizon and submits transactions; to build and sign them, use the Python Stellar SDK.

The documentation has the guide and the API reference.

Install

pip install stellar-horizon

Example

from stellar_horizon import HorizonClient

ACCOUNT = "GALAXYVOIDAOPZTDLHILAJQKCVVFMD4IKLXLSZV5YHO7VY74IWZILUTO"

with HorizonClient("https://horizon.stellar.org") as client:
    account = client.accounts.get(ACCOUNT)
    for balance in account.balances:
        print(f"{balance.balance:f} {balance.asset_code or balance.asset_type}")

    for payment in client.payments.list(account=account.account_id, order="desc"):
        print(f"{payment.created_at}: {payment.type}")

    with client.ledgers.stream() as stream:
        for ledger in stream:
            print(f"ledger {ledger.sequence} closed at {ledger.closed_at}")

The guide covers paging, streaming, submitting transactions and errors, and AsyncHorizonClient, the same client for asyncio.

Development

The project uses uv.

make check       # lint, type-check and test
make docs-serve  # preview the documentation

License

Apache-2.0

Metadata

Release files for stellar-horizon 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 stellar-horizon 0.1.1
File Size Uploaded Provenance Actions
stellar_horizon-0.1.1.tar.gz 489.8 kB With provenance Details for stellar_horizon-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 569.9 kB

Release files / stellar_horizon-0.1.1.tar.gz

Download URL stellar_horizon-0.1.1.tar.gz
Size 489.8 kB
Tags Source
SHA-256 checksum
How to use checksums
99c1f8e218b03ad3fc49d235ac8c38b9fcbf09d2c840dd6a1088f1bf6e3d669a
BLAKE2b-256 checksum
How to use checksums
def79204ca0ba4289fb513f1bcda520e93150afaa827a2430746257aa85a45b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

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

Download URL stellar_horizon-0.1.1-py3-none-any.whl
Size 80.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42e4d635bd09f64db5089924b3dfdc50a14e1e05d8c9b47fba339129486b2758
BLAKE2b-256 checksum
How to use checksums
641bd6e351e56a81bf5fd88352b92e2f51456d2030a9bd52ec1debdfde970201
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Security for stellar-horizon 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

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

Select from 2 files

Attestation for stellar_horizon-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 Nov 27, 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full 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