CardanoPy: Operate and Extend Cardano Nodes Using a Python CLI

The Cardano node is one of the core components that underpin the Cardano network. However, setting up the Cardano node is somewhat difficult for new users. This is especially true for new developers who want to build and dockerize Cardano nodes, partly because the IOHK docker image is not extensible. When these onboarding tasks are complex, new users spend more of their time solving infrastructure and development productivity issues rather than focusing on their business problems. 

To reduce these onboarding and development frictions, Bourke Floyd is building CardanoPy – an extensible Cardano node that users can extend and operate using a Python CLI. Bourke Floyd is a US Navy veteran and engineer with over ten years of software development experience. He has worked both as a developer and DevOps engineer on a wide range of projects, including mobile gaming and military simulations. Bourke has also built multiple pipelines supporting massive real-time events in AWS and GCP. CardanoPy is entirely his brainchild- so let’s see what it’s all about and the value it brings to the Cardano ecosystem. 

What is CardanoPy?

CardanoPy is a simple and easy-to-use method for operating and extending Cardano nodes using a python CLI combined with docker. It is intended for enhancing dApp development and data infrastructure by providing python access to Cardano node, on-chain data, and APIs. CardanoPy is designed to ensure users can easily bootstrap and extend Cardano nodes with their own features in a way that fits their project. 

Although CardanoPy is not yet complete, a pre-release that offers some really cool features is already available. It has been built with ease of use in mind, making it easier for beginners to learn. Within a few minutes, you can have a Cardano node running on your local device as follows:

  • Install CardanoPy: pip3 install cardanopy
  • Create the basic config for testnet: cardanopy create -t basic -n testnet app
  • Start the node using the config: cardanopy docker run app
  • Once logged into the node, run:  cardanopy cli query tip

Here’s a video where Bourke provides a quick run-through of CardanoPy and its proof of concept. 

Roadmap for Developing the Extensible Cardano Node

According to Bourke, the initial focus when developing CardanoPy will be extending the above workflow to include templates that users can quickly spin up for the following use cases. 

  • basic: run a simple node
  • bp-k8s: blocker producer node for Kubernetes
  • relay-k8s: relay node for Kubernetes
  • bp-dc: block producer node for docker-compose
  • relay-dc: relay node for docker-compose
  • db-sync: db-sync Postgres sidecar
  • wallet: wallet sidecar

Once these customization and extension features are complete, developers will be able to extend and configure the base docker image for their dApps and ETL workflows.

The project owner has a clearly thought-out plan for delivering the project. As per the roadmap, the project will be delivered in monthly prints, with every release bringing a new feature to CardanoPy. Here is a quick overview of the planned continuous delivery of CardanoPy. 

  • ## 0.2.0 (March) – Kubernetes capabilities.
  • ## 0.3.0 (April) –  Release core Cardano CLI capabilities.
  • ## 0.4.0 (April) – Provide additional support for Python docker.
  • ## 0.5.0 (May) – Provide Cardano wallet capabilities.
  • ## 0.6.0 (June) – Provide db-sync capabilities (Postgres)
  • ## 0.7.0 (July to August) –  Allow data export to common formats such as JSON, CSV, GCP PubSub, and BigQuery. 
  • ## 1.0.0 (September) – Official release and complete documentation.

Note: Every feature release will be accompanied by a sample implementation of the release hosted on CardanoPy GitHub. Additionally, the project owner will create YouTube videos that will explain the feature and serve as a demo for particular use cases. 

At the time of writing, CardanoPy was at version 0.1.9. The timelines for subsequent CardanoPy releases might vary from the original plans depending on the status of feature development, availability of funding, or feedback from the Cardano community.

Project Funding 

The CardanoPy project is part of Fund 4 developer ecosystem proposals on Project Catalyst. In his proposal, Bourke is seeking $20,000 worth of funding to help bring this project to life. The requested funds will be split across development costs ($10,000) and operations ($10,000). As per the proposed roadmap, the project will require around six months of feature development, server operations, and continuous testing – the main areas where the funding will be used. 

Besides this, Bourke will offer free community support and marketing for CardanoPy. Part of this includes engaging the Cardano community for feedback collection and bug fixing. He will also create CardanoPy YouTube videos for free. 

Final thoughts

The CardanoPy project provides great value to the Cardano community besides solving the containerization project.  With an easily extensible node, developers will spend less time setting up their workflow on Cardano. Additionally, it will also serve as a great teaching tool for folks looking to get into the Cardano ecosystem.

For more information about the CardanoPy project, its implementation roadmap, status tracking, or any other questions related to the project, please have a look at the CardanoPy GitHub or check out  the project proposal on IdeaScale: https://cardano.ideascale.com/a/dtd/CardanoPy-5-min-extensible-node/341045-48088 

Share:

More Posts

Send Us A Message