ouro-sdk
Python SDK for the Ouroboros decentralized blockchain network.
Install
pip install ouro-sdk
# For async support (AsyncOuroClient):
pip install ouro-sdk[async]
Quick Start (sync)
from ouro_sdk import OuroClient
client = OuroClient("http://localhost:8000", api_key="your-api-key")
# Check health
print(client.health()) # {'status': 'healthy', ...}
# Get consensus state
c = client.consensus()
print(f"View: {c['view']}, Leader: {c['leader']}")
# Get balance
bal = client.balance("ouro1myaddress")
print(f"Balance: {bal['balance']} nanoouro")
# Submit a transaction
result = client.submit_transaction({
"sender": "ouro1abc...",
"recipient": "ouro1xyz...",
"amount": 1_000_000_000, # 1 OURO
"signature": "hex-encoded-signature",
})
print(f"TX: {result['tx_id']}")
# Combined status snapshot
status = client.status()
print(f"Online: {status['online']}, Block: {status.get('metrics', {}).get('block_height')}")
Quick Start (async)
import asyncio
from ouro_sdk import AsyncOuroClient
async def main():
client = AsyncOuroClient("http://localhost:8000", api_key="your-api-key")
health = await client.health()
consensus = await client.consensus()
status = await client.status()
print(status)
asyncio.run(main())
API Reference
| Method | Endpoint | Auth | Description |
|---|---|---|---|
health() |
GET /health | No | Node liveness |
identity() |
GET /identity | No | Node ID, role, uptime |
consensus() |
GET /consensus | No | View, leader, last block |
peers() |
GET /peers | No | Connected peers |
balance(address) |
GET /ouro/balance/:addr | No | OURO balance |
nonce(address) |
GET /ouro/nonce/:addr | No | Account nonce |
metrics() |
GET /metrics/json | Yes | TPS, sync %, mempool |
resources() |
GET /resources | Yes | CPU, RAM, disk |
mempool() |
GET /mempool | Yes | Mempool contents |
network_stats() |
GET /network/stats | Yes | Network stats |
get_transaction(id) |
GET /tx/:id | Yes | Transaction lookup |
submit_transaction(tx) |
POST /tx/submit | Yes | Submit transaction |
transfer(from, to, amt) |
POST /ouro/transfer | Yes | Transfer OURO |
status() |
combined | - | Full snapshot |
Environment Variables
OURO_API_KEY— API key for protected endpoints
License
MIT
Metadata
Release files for ouro-sdk 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ouro_sdk-1.0.0.tar.gz | 4.6 kB | Without provenance | Details for ouro_sdk-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ouro_sdk-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for ouro_sdk-1.0.0-py3-none-any.whl |
Total release size: 9.7 kB
Release files / ouro_sdk-1.0.0.tar.gz
| Download URL | ouro_sdk-1.0.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21e33c7da7fa1ac1dd04301b443312d4bba783efba510710276d7470ea859f24
|
|
BLAKE2b-256 checksum How to use checksums |
f6ddfe21b787d9ac4cf2dc39320a1b1c4d98df6f4052eed21256af6f5f4caeb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / ouro_sdk-1.0.0-py3-none-any.whl
| Download URL | ouro_sdk-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e0b54c34f1d01affe3fd11ca84c569b7813b193dc8a92f7f26523ea787da7ac
|
|
BLAKE2b-256 checksum How to use checksums |
520bf7bdc2475d9a800cc3850efef898797d5eba6d7ab9516630c8a035adebd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for ouro-sdk 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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.