Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
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.
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
pip install ogmios
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}")
For more examples, see the documentation and example scripts in the repo.
Complete client documentation is available on Read the Docs.
ogmios-python
is distributed under the terms of the GPL-3.0-or-later license.
FAQs
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.
We found that ogmios demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.