Python SDK for the UTxO RPC interface
- Sync and Query service clients for Cardano blockchain
- Support for both synchronous and asynchronous operations
- Type-safe implementation with Protocol Buffers
- Easy-to-use API with connection management
Due to import path issues in utxorpc-spec 0.16.0, you must import spec_compatibility before using this SDK:
import spec_compatibility
from utxorpc import CardanoSyncClient, CardanoQueryClientutxorpc requires Python3.9>,<4.0. To setup a local environment you can run:
just initThis will use your system's python3, whichever it may be. If you wish to setup a particular Python executable (for example, python3.12) you should do:
just init python3.12To run the examples, you require an Demeter API Key for the UtxoRPC service. To get your API key, you can check the documentation at (https://docs.demeter.run/cli)[https://docs.demeter.run/cli]:
just run-examples YOUR_DMTR_API_KEYBefore commiting, make sure to run the following to format and lint the code.
just format
just lint