pycspr


Namepycspr JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/casper-network/casper-python-sdk
SummaryPython library for interacting with a CSPR node.
upload_time2024-04-04 10:18:40
maintainerMark A. Greenslade
docs_urlNone
authorMark A. Greenslade
requires_python<4.0,>=3.12
licenseApache-2.0
keywords casper network blockchain python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Casper Python SDK

Python library for interacting with a CSPR node.

##  Installation

```
pip3 install pycspr
```

##  Usage

### Cryptography

* [How To: Apply a checksum ?](how_tos/crypto/how_to_apply_a_checksum.py)

* [How To: Create Key Pairs ?](how_tos/crypto/how_to_create_key_pairs.py)

* [How To: Hash data ?](how_tos/crypto/how_to_hash_data.py)

* [How To: Sign data ?](how_tos/crypto/how_to_sign_data.py)

### Deploys

* [How To: Transfer funds between 2 accounts ?](how_tos/deploys/how_to_transfer.py)

* [How To: Delegate funds to a validator ?](how_tos/deploys/how_to_delegate.py)

* [How To: Undelegate funds from a validator ?](how_tos/deploys/how_to_undelegate.py)

* [How To: Stake funds as a validator ?](how_tos/deploys/how_to_stake.py)

* [How To: Unstake funds as a validator ?](how_tos/deploys/how_to_unstake.py)

### Smart Contracts

* [How To: Install a smart contract ?](how_tos/smart_contracts/how_to_install.py)

* [How To: Invoke a smart contract ?](how_tos/smart_contracts/how_to_invoke.py)

* [How To: Query a smart contract ?](how_tos/smart_contracts/how_to_query.py)

### Node APIs

* [How To: Use REST API ?](how_tos/node_apis/how_to_use_rest_client.py)

* [How To: Use RPC API ?](how_tos/node_apis/how_to_use_rpc_client.py)

* [How To: Use Speculative RPC API ?](how_tos/node_apis/how_to_use_speculative_rpc_client.py)

* [How To: Use SSE API ?](how_tos/node_apis/how_to_use_sse_client.py)

##  Development

### Pre-Requisites

[1. Setup Local CCTL Network](https://github.com/casper-network/cctl).

[2. Install poetry](https://python-poetry.org).

### 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]
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/casper-network/casper-python-sdk",
    "name": "pycspr",
    "maintainer": "Mark A. Greenslade",
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": "asladeofgreen@gmail.com",
    "keywords": "Casper Network, Blockchain, Python",
    "author": "Mark A. Greenslade",
    "author_email": "asladeofgreen@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f4/7d/e9974fe4571ee0ff21ffdb58750d25fab682c98f6b290067fe6646f33e21/pycspr-1.2.0.tar.gz",
    "platform": null,
    "description": "# Casper Python SDK\n\nPython library for interacting with a CSPR node.\n\n##  Installation\n\n```\npip3 install pycspr\n```\n\n##  Usage\n\n### Cryptography\n\n* [How To: Apply a checksum ?](how_tos/crypto/how_to_apply_a_checksum.py)\n\n* [How To: Create Key Pairs ?](how_tos/crypto/how_to_create_key_pairs.py)\n\n* [How To: Hash data ?](how_tos/crypto/how_to_hash_data.py)\n\n* [How To: Sign data ?](how_tos/crypto/how_to_sign_data.py)\n\n### Deploys\n\n* [How To: Transfer funds between 2 accounts ?](how_tos/deploys/how_to_transfer.py)\n\n* [How To: Delegate funds to a validator ?](how_tos/deploys/how_to_delegate.py)\n\n* [How To: Undelegate funds from a validator ?](how_tos/deploys/how_to_undelegate.py)\n\n* [How To: Stake funds as a validator ?](how_tos/deploys/how_to_stake.py)\n\n* [How To: Unstake funds as a validator ?](how_tos/deploys/how_to_unstake.py)\n\n### Smart Contracts\n\n* [How To: Install a smart contract ?](how_tos/smart_contracts/how_to_install.py)\n\n* [How To: Invoke a smart contract ?](how_tos/smart_contracts/how_to_invoke.py)\n\n* [How To: Query a smart contract ?](how_tos/smart_contracts/how_to_query.py)\n\n### Node APIs\n\n* [How To: Use REST API ?](how_tos/node_apis/how_to_use_rest_client.py)\n\n* [How To: Use RPC API ?](how_tos/node_apis/how_to_use_rpc_client.py)\n\n* [How To: Use Speculative RPC API ?](how_tos/node_apis/how_to_use_speculative_rpc_client.py)\n\n* [How To: Use SSE API ?](how_tos/node_apis/how_to_use_sse_client.py)\n\n##  Development\n\n### Pre-Requisites\n\n[1. Setup Local CCTL Network](https://github.com/casper-network/cctl).\n\n[2. Install poetry](https://python-poetry.org).\n\n### Install SDK\n\n```\ncd YOUR_WORKING_DIRECTORY\ngit clone https://github.com/casper-network/casper-python-sdk.git\ncd casper-python-sdk\npoetry install\n````\n\n### Testing \n\n#### Important Environment Variables\n\n* Mandatory\n\n    * CCTL\n\n        * path to local clone of CCTL repo\n\n* Optional\n\n    * PYCSPR_TEST_NODE_HOST\n\n        * host of a test node\n        * default =  localhost\n\n    * PYCSPR_TEST_NODE_PORT_REST\n\n        * port of rest server exposed by test node\n        * default =  14101\n\n    * PYCSPR_TEST_NODE_PORT_RPC\n\n        * port of json-rpc server exposed by test node\n        * default =  11101\n\n    * PYCSPR_TEST_NODE_PORT_SSE\n\n        * port of sse server exposed by test node\n        * default =  18101\n\n    * PYCSPR_TEST_NODE_PORT_RPC_SPECULATIVE\n\n        * port of speculative execution server exposed by test node\n        * default =  25101\n\n#### Running Tests\n\n```\ncd YOUR_WORKING_DIRECTORY/casper-python-sdk\npoetry shell\npytest ./tests [TEST-FILTER]\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Python library for interacting with a CSPR node.",
    "version": "1.2.0",
    "project_urls": {
        "Documentation": "https://github.com/casper-network/casper-python-sdk/blob/main/README.md",
        "Homepage": "https://github.com/casper-network/casper-python-sdk",
        "Repository": "https://github.com/casper-network/casper-python-sdk"
    },
    "split_keywords": [
        "casper network",
        " blockchain",
        " python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6ad181fb4522c9a271bac203011673645167a66b491496c94695fc9a292296eb",
                "md5": "d9a68fbd3e0f76255890643b68bee212",
                "sha256": "77f24979727d38f104ca2be9ac8b8f813ff64de245a12a589a24be984af55d0a"
            },
            "downloads": -1,
            "filename": "pycspr-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d9a68fbd3e0f76255890643b68bee212",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 72804,
            "upload_time": "2024-04-04T10:18:37",
            "upload_time_iso_8601": "2024-04-04T10:18:37.907343Z",
            "url": "https://files.pythonhosted.org/packages/6a/d1/81fb4522c9a271bac203011673645167a66b491496c94695fc9a292296eb/pycspr-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f47de9974fe4571ee0ff21ffdb58750d25fab682c98f6b290067fe6646f33e21",
                "md5": "aa27cc6535c902b10a60dc31fd2d48c8",
                "sha256": "119d8f6d2dd51ee841c6bd95756666e0d8c85dd896d3571b0f856c456120553a"
            },
            "downloads": -1,
            "filename": "pycspr-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "aa27cc6535c902b10a60dc31fd2d48c8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 48139,
            "upload_time": "2024-04-04T10:18:40",
            "upload_time_iso_8601": "2024-04-04T10:18:40.104051Z",
            "url": "https://files.pythonhosted.org/packages/f4/7d/e9974fe4571ee0ff21ffdb58750d25fab682c98f6b290067fe6646f33e21/pycspr-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-04 10:18:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "casper-network",
    "github_project": "casper-python-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pycspr"
}
        
Elapsed time: 5.00654s