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

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_SPEC_EXEC

      • 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.0.1.tar.gz (42.6 kB view details)

Uploaded Source

Built Distribution

pycspr-1.0.1-py3-none-any.whl (62.1 kB view details)

Uploaded Python 3

File details

Details for the file pycspr-1.0.1.tar.gz.

File metadata

  • Download URL: pycspr-1.0.1.tar.gz
  • Upload date:
  • Size: 42.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.1.0

File hashes

Hashes for pycspr-1.0.1.tar.gz
Algorithm Hash digest
SHA256 811e4053515b32148f9cfa09f7d15e7315e2ca7114712694588271fa10129091
MD5 f43ce947d4303a8e2fd571ccb449256b
BLAKE2b-256 4977285719cf82490eedb7069fb5525a2ed77b175d44af23f9b96baeef48659b

See more details on using hashes here.

File details

Details for the file pycspr-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pycspr-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 62.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.1.0

File hashes

Hashes for pycspr-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 30d701c341bd4c4a16c86b7b2c3046d4fbd61f4e9712401ddec8be02bbddf604
MD5 8e5c7708282817ec8dd5797ce85d0a00
BLAKE2b-256 61c8df8f5059f0cf0fe78edb5be3a7105d4eb567b14e8e8bf82549ac7e6f7864

See more details on using hashes here.

Supported by

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