The Dharitri Python SDK.
Project description
drt-sdk-py
The Python SDK for interacting with Dharitri. It's an all in one sdk that can be used to create transactions (including smart contract calls and deployments), sign and broadcast transactions, create wallets and many more.
Documentation
Development setup
Virtual environment
Create a virtual environment and install the dependencies:
python3 -m venv ./venv
source ./venv/bin/activate
pip install -r ./requirements.txt --upgrade
Install development dependencies, as well:
pip install -r ./requirements-dev.txt --upgrade
Above, requirements.txt
should mirror the dependencies section of pyproject.toml
.
If using VSCode, restart it or follow these steps:
Ctrl + Shift + P
- Select Interpreter
- Choose
./venv/bin/python
.
Tests
Run the tests as follows:
This command runs all tests:
pytest .
If you want to skip network interaction tests run:
pytest -m "not networkInteraction"
Generate test coverage report
First, we run the tests using coverage:
coverage run -m pytest .
Then, we can generate a report in the terminal using:
coverage report
We can also generate a html report using:
coverage html
Regenerating the docs
Each time a new module/submodule is added it needs to be added to the docs, as well. To do so cd
in the root directory then run the following command:
sphinx-apidoc -f -o docs/ drt_sdk/ *_test.py *constants.py
This command will regenerate the .rst
files for each module, excluding the tests and the constants.py
files.
Also, each time a new version is released, the conf.py file should be updated accordingly.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file drt_sdk-0.0.1.tar.gz
.
File metadata
- Download URL: drt_sdk-0.0.1.tar.gz
- Upload date:
- Size: 16.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd7d4b4e638172ea817530ec7a89a63ec5913789cd9f4e52663be1b2b2d54830 |
|
MD5 | f0b46c3d18ad953d19feb2b63a3cc24b |
|
BLAKE2b-256 | 89f9c8690f2652a7b7df46179abf19c9b5ed1c4a92cc191bd43950db584c8e33 |
File details
Details for the file drt_sdk-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: drt_sdk-0.0.1-py3-none-any.whl
- Upload date:
- Size: 16.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4433896c5a14652fcdeef31da25750b95026448bbfb4bfafffe386fe5cdb502e |
|
MD5 | bea2ba5110912b9ea0097590b5bbaa43 |
|
BLAKE2b-256 | f0d02dd1d4a1221dbd9e266482f6fce903691bd1df249223f082835c7edcf9d3 |