Install & Compatibility
Where this runs
tested against v0.19.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.830s · 68.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 8.1s · import 0.740s · 69MB
72MB installed
● package 72MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
PaymentSigningKey
✓ from pycardano import PaymentSigningKey
✗ from pycardano import PaymentSigningKey
Generates a key pair, derives an address, and attempts to build a simple transaction using Blockfrost.
import os
from pycardano import (
PaymentSigningKey,
PaymentVerificationKey,
Address,
BlockFrostChainContext,
TransactionBuilder,
TransactionOutput,
Value,
Network
)
# Generate a key pair
signing_key = PaymentSigningKey.generate()
verification_key = PaymentVerificationKey.from_signing_key(signing_key)
# Derive address (testnet)
address = Address(payment_part=verification_key.hash(), network=Network.TESTNET)
print(f"Address: {address}")
# Create a chain context (use Blockfrost API key from env)
context = BlockFrostChainContext(
base_url="https://cardano-testnet.blockfrost.io/api/v0",
project_id=os.environ.get("BLOCKFROST_PROJECT_ID", "")
)
# Build a simple transaction (requires actual UTXOs and funds)
try:
builder = TransactionBuilder(context)
builder.add_output(TransactionOutput(address, Value(1000000)))
tx_body, tx_hash = builder.build_and_sign([signing_key], change_address=address)
print(f"Transaction hash: {tx_hash}")
except Exception as e:
print(f"Error building transaction: {e}")
Upgrade
Version history
0.19.2latest on PyPI · released Mar 1, 2026
Audit
Dependencies
cbor2requiredCBOR serialization/deserialization for Cardano binary data
blockfrost-pythonoptionalBlockfrost API client for accessing chain data
httpxrequiredHTTP client for OGMios and other backends