Skip to main content

ogmios-python

Pipeline Documentation Status PyPI - Version PyPI - Python Version Codecov Catalyst


Ogmios is a lightweight bridge interface for cardano-node. It offers a WebSockets API that enables local clients to speak Ouroboros’ mini-protocols via JSON/RPC. ogmios-python is an Ogmios client written in Python designed for ease of use.


Table of Contents

Installation

  1. Install cardano-node and Ogmios server as described here. (Docker installation is recommended.)
  2. Install ogmios-python from PyPI using pip:
pip install ogmios

Quickstart

To see how easy it is to build on Cardano with ogmios-python, let's use the library to view new blocks as they are added to the blockchain:

import ogmios

with ogmios.Client() as client:
    # Set chain pointer to origin
    _, tip, _ = client.find_intersection.execute([ogmios.Origin()])

    # Now set chain pointer to tip
    _, _, _ = client.find_intersection.execute([tip.to_point()])

    # Tail blockchain as new blocks come in beyond the current tip
    while True:
        direction, tip, point, _ = client.next_block.execute()
        if direction == ogmios.Direction.forward:
            print(f"New block: {point}")

terminal output

For more examples, see the documentation and example scripts in the repo.

Documentation

Complete client documentation is available on Read the Docs.

License

ogmios-python is distributed under the terms of the GPL-3.0-or-later license.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ogmios-1.4.3.tar.gz (114.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ogmios-1.4.3-py3-none-any.whl (128.9 kB view details)

Uploaded Python 3

File details

Details for the file ogmios-1.4.3.tar.gz.

File metadata

  • Download URL: ogmios-1.4.3.tar.gz
  • Upload date:
  • Size: 114.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.7

File hashes

Hashes for ogmios-1.4.3.tar.gz
Algorithm Hash digest
SHA256 f9e756df83be385f89c82a194a3c51c0a4ba25e5df699dfcfb2914a57c012754
MD5 3228e95ad9cfd8b1ee74d1172da26c0d
BLAKE2b-256 f4a5713afcc13265f70685dc8e8fb2bcf9dbef0d64e2f44b46280e7a1caab7bc

See more details on using hashes here.

File details

Details for the file ogmios-1.4.3-py3-none-any.whl.

File metadata

  • Download URL: ogmios-1.4.3-py3-none-any.whl
  • Upload date:
  • Size: 128.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.7

File hashes

Hashes for ogmios-1.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6d6eb9e2c577d71a90ab4dd72112990933dd29e3d7fb58053f9009ddc53db358
MD5 3973a0f2dc8c06921f98cdec5169a794
BLAKE2b-256 d6e03c9ce6307a538af8273a07a0a51b06cc34a3c1017189821c86b30a01ce93

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.4.3 This release

2 files

1.4.2

2 files

1.4.1

2 files

1.3.0

2 files

1.2.1

2 files

1.2.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page