Skip to main content

pyogmios

PyPI Python CI Docs License

A Python client for Ogmios v7, the lightweight JSON-RPC bridge to cardano-node. Query the ledger, follow the chain, watch the mempool and submit transactions, with every request and answer typed.

Documentation

import pyogmios

with pyogmios.Client("ws://localhost:1337") as client:
    epoch = client.ledger_state.epoch()
    utxos = client.ledger_state.utxo(addresses=["addr_test1..."])
    parameters = client.ledger_state.protocol_parameters()
    print(epoch, len(utxos), parameters.max_transaction_size)
from pyogmios.types import RollForward

async with pyogmios.AsyncClient() as client, client.chain_sync(["origin"]) as sync:
    async for event in sync:
        if isinstance(event, RollForward):
            print(event.block.height, event.block.id)

Features

  • All of Ogmios v7: the 24 ledger and network queries, chain sync, mempool monitoring, and transaction submission and evaluation, each a typed method.
  • Typed from the schema, checked against the chain: about 500 Pydantic models generated from the Ogmios JSON schema, corrected where the schema and the server disagree, and checked against every block of the preview network.
  • Async and sync: AsyncClient and Client, with the same methods.
  • Resilient: many requests in flight on one WebSocket connection, timeouts, reconnection with backoff, and chain sync that resumes after a dropped connection.
  • Precise errors: every Ogmios error code is its own exception, including each of the 74 ledger rules a transaction can break, with the server's details parsed.
  • A command line: pyogmios health, pyogmios query epoch, pyogmios follow.
  • Python 3.11 to 3.15, including the free-threaded builds.

Install

pip install pyogmios
pip install "pyogmios[speedups]"   # with orjson, for faster JSON

You need an Ogmios v7 server connected to a cardano-node: see Getting started.

Contributing

See CONTRIBUTING.md: uv, just, a fake Ogmios for unit tests, and a Docker devnet for live ones.

License

Apache-2.0.

Metadata

Release files for pyogmios 1.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 pyogmios 1.0.0
File Size Uploaded Provenance Actions
pyogmios-1.0.0.tar.gz 66.0 kB With provenance Details for pyogmios-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 137.9 kB

Release files / pyogmios-1.0.0.tar.gz

Download URL pyogmios-1.0.0.tar.gz
Size 66.0 kB
Tags Source
SHA-256 checksum
How to use checksums
28fcc063e42003cc3dbde0ac658cf84aa713e006bf71e3eb1209c587f9804fe2
BLAKE2b-256 checksum
How to use checksums
10c5cb9eff5ceabe29aea2e77c358cc2f82a61ac75e06b0db8c868af9be6f56a
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 Oct 21, 2026.

Transparency log

Release files / pyogmios-1.0.0-py3-none-any.whl

Download URL pyogmios-1.0.0-py3-none-any.whl
Size 71.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0816c72d637afd6ae1e4eda6ba6064bed1db185aff0b5b1817b2bee24faa2623
BLAKE2b-256 checksum
How to use checksums
891ac4f30fc23666e8020afd5b2ed3379a85d94a238802eb92b1b83d35dfc5fb
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 Oct 21, 2026.

Transparency log

Security for pyogmios 1.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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyogmios-1.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 21, 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