Skip to content

floydcraft/cardano-py-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cardano-py Discord

CardanoPy

NOTE: THIS IS A PRE-RELEASE of cardanopy (until it reaches 1.0 in 2 months or so; currently 0.1.6 as of Pi Day (3/14/2021), but already with some cool features)

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. This project is a Fund4 proposal for Project Catalyst @ Idealscale.

CardanoPy Examples

Prerequisites

  • python3 is installed
  • docker is installed and running

Quickstart - see Basic Example

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 cli 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.

    {
        "blockNo": 351325,
        "headerHash": "3649fcfed5be50be78036c900e98057917e89d8faa54b64499af0779e4232040",
        "slotNo": 352369
    }

Cleanup Examples

NOTE: this is for the Quickstart basic examples.

  • Stop the Cardano node docker container:

    cardanopy docker stop files/app/

  • Remove the files / cache

    rm -rf files/

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published