Skip to main content

The DharitrI Python SDK.

Project description

drt-py-sdk

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/ dharitri_py_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


Download files

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

Source Distribution

dharitri_py_sdk-0.0.1.tar.gz (16.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dharitri_py_sdk-0.0.1-py3-none-any.whl (16.2 MB view details)

Uploaded Python 3

File details

Details for the file dharitri_py_sdk-0.0.1.tar.gz.

File metadata

  • Download URL: dharitri_py_sdk-0.0.1.tar.gz
  • Upload date:
  • Size: 16.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for dharitri_py_sdk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c09f34877e317c047c1b6452c1ff6616920d8afacdbfbc6c5550f4531c9231ad
MD5 d2154afe4846cd2e1bf69ded8e1621ee
BLAKE2b-256 9622e4f644b7c4c433ab8f6d44b348e9e91e4a9c932e365d6fb9628bf9af566c

See more details on using hashes here.

File details

Details for the file dharitri_py_sdk-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dharitri_py_sdk-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3e4650ea60176c2fd80233699b25d7794313dd63cc387a286521e30daa606915
MD5 5e62f99ceaa2b00b9807c2cd04e9ff6c
BLAKE2b-256 e140f2407c72cb30380b1e47d21b0a428f18b59589666275938d532d3199956a

See more details on using hashes here.

Supported by

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