Skip to main content

Python library for interacting with a CSPR node.

Project description

Casper Python SDK

Python library for interacting with a CSPR node.

Installation

pip3 install pycspr

Usage

Cryptography

Deploys

Smart Contracts

Node APIs

Development

Pre-Requisites

1. Setup Local CCTL Network.

2. Install poetry.

Install SDK

cd YOUR_WORKING_DIRECTORY
git clone https://github.com/casper-network/casper-python-sdk.git
cd casper-python-sdk
poetry install

Testing

Important Environment Variables

  • Mandatory

    • CCTL

      • path to local clone of CCTL repo
  • Optional

    • PYCSPR_TEST_NODE_HOST

      • host of a test node
      • default = localhost
    • PYCSPR_TEST_NODE_PORT_REST

      • port of rest server exposed by test node
      • default = 14101
    • PYCSPR_TEST_NODE_PORT_RPC

      • port of json-rpc server exposed by test node
      • default = 11101
    • PYCSPR_TEST_NODE_PORT_SSE

      • port of sse server exposed by test node
      • default = 18101
    • PYCSPR_TEST_NODE_PORT_RPC_SPECULATIVE

      • port of speculative execution server exposed by test node
      • default = 25101

Running Tests

cd YOUR_WORKING_DIRECTORY/casper-python-sdk
poetry shell
pytest ./tests [TEST-FILTER]

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

pycspr-1.2.0.tar.gz (48.1 kB view hashes)

Uploaded Source

Built Distribution

pycspr-1.2.0-py3-none-any.whl (72.8 kB view hashes)

Uploaded 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