Skip to main content

The MultiversX Python SDK.

Project description

mx-sdk-py

The Python SDK for interacting with MultiversX. 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/ multiversx_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

multiversx_sdk-0.16.1.tar.gz (16.0 MB view details)

Uploaded Source

Built Distribution

multiversx_sdk-0.16.1-py3-none-any.whl (16.2 MB view details)

Uploaded Python 3

File details

Details for the file multiversx_sdk-0.16.1.tar.gz.

File metadata

  • Download URL: multiversx_sdk-0.16.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

Hashes for multiversx_sdk-0.16.1.tar.gz
Algorithm Hash digest
SHA256 075f326c3901fd560f4f7622a46ed11c48b5c0d9d94570b984460c0796058a5c
MD5 0ab94f44e463946d3428130b8077ef21
BLAKE2b-256 7ff932df7c9040309bce998d90a16bf2ad36b97d9de0c479a4d468c3c8139a28

See more details on using hashes here.

File details

Details for the file multiversx_sdk-0.16.1-py3-none-any.whl.

File metadata

File hashes

Hashes for multiversx_sdk-0.16.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0391749f62926475c7037a22aefa62bbcc695c7687df96bb35a2ad72e0ccf24e
MD5 24ea4966a0e602f29e15259b26129fc6
BLAKE2b-256 0a9bba605447eba26024281d7ffcc833eab41fdb417c0d6e7cd93a1f720f53c3

See more details on using hashes here.

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