Skip to main content

Cardano Python lib to interact with the blockchain

Project description

CardanoPythonLib

Cardano Python Library

Installation

  1. Prerequesites
  • Minimum: Cardano-cli, Cardano Wallet and Cardano Address installed. You will be able to run offchain code, generate keys, create and sign transactions.
  • Desired: Cardano-node running. You will be able to submit onchain and get confirmations from the blockchain.
  • Unlock more: Cardano wallet installed. You will be able to create wallets using the Cardano Wallet API.

As a side note, we are working to allow the interaction of this library with the Cardano blockchain without the need of any cardano node or even cardano CLI/wallet/address installed locally.

  1. Virtual environment setup As you might know, it is recommended to run python code from a virtual environment to isolate your installation and keep everything clean and organized.

I work with virtualenvwrapper but you can use your prefered choice. For virtualenvwrapper:

sudo apt install python3-pip
sudo -H pip3 install --upgrade pip
sudo -H pip3 install virtualenv virtualenvwrapper

echo "export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3" >> ~/.bashrc

echo "export WORKON_HOME=~/Env" >> ~/.bashrc
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc

Create the virtual environment

mkvirtualenv <pick a cool name>

List all virtual environments

lsvirtualenv
  1. Download the library from github

We are working to allow the installation of this library with pip but in the meantime:

git clone https://github.com/larestrepo/CardanoPythonLib.git
  1. Install requirements (For the time being optional)

If you look at the requirements, in this release, it only contains some support dependencies for shaping and styling python code. Basically no dependencies as of now.

Make sure to have active your virtual environment

pip install -r requirements.txt

You should be good to go

Working with the library

cardanopythonlib folder is the package that contains the main functionalities.

base.py file contains 3 classes.

  • Starter
  • Node
  • Keys

For usage please go to docs folder.

Project details


Download files

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

Source Distribution

cardanopythonlib-1.0.1.tar.gz (22.4 kB view hashes)

Uploaded Source

Built Distribution

cardanopythonlib-1.0.1-py2.py3-none-any.whl (23.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page