Skip to content

Python3 lib and cli for operating a Cardano Passive Node and using the API's. (PRE-ALPHA)

License

Notifications You must be signed in to change notification settings

floydcraft/cardano-py

Repository files navigation

ORPHANED PROEJCT - DO NOT NOT USE

though maybe an ok reference

I'm officially stopping my work on this project. It was a lot of fun, but for quite a number of reasons (some personal, others learned) I'll be moving on to work on some new projects (dApps). Thank you to everyone who provided feedback and supported me along the way!

dockeri.co

GitHub issues

CardanoPy

Table of Contents

WARNING: THIS IS A PRE-RELEASE of cardanopy (until it reaches 1.0.0; currently 0.1.7)

Things will:

  • Break
  • Lack documentation
  • Differ greatly between iterations
  • Disorient, overload and inspire

Overview

NOTE: Please visit the Cardano Idealscale link and provide this project Kudos and/or provide feedback!

CardanoPy is a simple and easy to use method to operate and extend Cardano Nodes (Relay and Producer) and DB Sync Nodes using a python CLI combined with docker. It's intended for dApp development and data infrastricture by providing python access to cardano node and onchain data / apis.

Checkout the Project Catalyst - Fund 4 Proposal and Project Catalyst - Fund 5 Proposal.

Also see CLI.md, ROADMAP.md, and CHANGELOG.md.

Problem

Cardano nodes are complex and really should be SIMPLE to bootstrap / extend with your own features / projects using docker / python.

Solution

See Quickstart.

Quickstart

Use predefined docker image cardano-py-slim

See Basic Example for custom docker image example.

  • Install or upgrade cardanopy:

    pip3 install --upgrade cardanopy

  • Create the basic config for testnet:

    cardanopy create --template basic --network testnet files/app

    Created cardano defaults from 'basic' template for network 'testnet': 'files/app'
  • Start/run the node using that config:

    cardanopy docker run files/app

    ada@ce02f129e793:~$
  • Once your logged into the node, run:

    cardanopy node query tip as often as you like.

    NOTE: might take a minute before the files/app/node.socket file to be created while cardano node is booting. It will take longer the larger the database files/app/db.

    {
    "epoch": 126,
    "hash": "bafe78f11866e3b77a254f55c46bd44335b367197db74fb95620237f43fe583d",
    "slot": 24098404,
    "block": 2494291
    }

Core Docker Images

Available on floydcraft dockerhub

CardanoPy

  • cardano-py-slim - Runtime slim build of CardanoPy Cardano node. Preinstalls latest cardanopy package.

Cardano IOHK

Common

  • haskell - base image to build Haskell projects like Cardano.