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

Built distribution (wheel)

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

Total release size: 561.8 kB

Release files / stellar_horizon-0.1.0.tar.gz

Download URL stellar_horizon-0.1.0.tar.gz
Size 482.7 kB
Tags Source
SHA-256 checksum
How to use checksums
19eeadaef3ecda592149383bed72671a97c8fa124b9404d129bd3536c3f4c3d9
BLAKE2b-256 checksum
How to use checksums
969792fecfc1dc32d95d10517b99e04fcc35c151cd245a06c42cb231d0353e2b
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 19, 2026.

Transparency log

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

Download URL stellar_horizon-0.1.0-py3-none-any.whl
Size 79.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb711fb7c170d195a8096d48db2ea2ff6d3942d03c7076637cac01b18e48ab02
BLAKE2b-256 checksum
How to use checksums
84b6fe28230f524229fd732ba2fa5bbe6aa2a3eb5b23ebf27d5f2b7eabc94918
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 19, 2026.

Transparency log

Security for stellar-horizon 0.1.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 stellar_horizon-0.1.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 Nov 19, 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.0 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