Skip to main content

Interfaces with the Cardano full-node software.

Project description

Cardano Tools

A python module for interacting with the Cardano blockchain.

The Cardano-Tools module provides functionality for interfacing with running full nodes on local or remote hosts. A running Cardano node is a prerequisite for using this package.

Provided tools include:

  • Interfacing with the node:
    • Starting a relay or pool node locally and remotely.
    • Getting the node tip.
  • Creating and administrating a wallet:
    • Create a new wallet address
    • Get UTXO list
    • Send a payment
    • Register a staking address
    • Get the blockchain tip
    • Check staking rewards balance
    • Claim staking rewards
    • Claim ITN rewards
  • Creating and administrating a stake pool:
    • Create block producing keys
    • Updating pool KES keys
    • Register a stake pool
    • Retire a stake pool

This project is developed and maintained by the team at Viper Staking.


You can install Cardano Tools from PyPI:

pip install cardano-tools

The Cardano Tools package supports Python 3.7 and above.


For more detailed examples, see the example scripts.

Shelley Tools

The ShelleyTools class provides an interface to the cardano-cli shelley commands. An example for creating a wallet is given below.

from cardano_tools import ShelleyTools

# Test Inputs (example paths)
path_to_cli = "/home/user/.cabal/bin/cardano-cli"
path_to_socket = "/home/user/relay-node/db/node.socket"
working_dir = "/home/user/.cardano-tools/"

# Create a ShelleyTools object
shelley = ShelleyTools(
    network="--testnet-magic 42"  # <-- For the testnet (default: --mainnet)

# Create a wallet address with both spending and staking keys.

Optionally, an SSH connection object may be specified if working with remote hosts.

from cardano_tools import ShelleyTools
from fabric import Connection

# Test Inputs (example paths)
path_to_cli = "/home/user/.cabal/bin/cardano-cli"
path_to_socket = "/home/user/relay-node/db/node.socket"
working_dir = "/home/user/.cardano-tools/"

# SSH connection to remote host
conn = Connection(
        "key_filename": "/home/myuser/.ssh/private.key",

shelley = ShelleyTools(

Related Projects

The Cardano-Tools library is also used in the official Viper Staking Docker containers.


Join our telegram channel to get support and discuss potential upgrades or changes.

If you find our tools useful, please consider buying us a beer!



Project details

Download files

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

Files for cardano-tools, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size cardano_tools-0.4.0-py3-none-any.whl (12.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size cardano-tools-0.4.0.tar.gz (13.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page