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
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
Hashes for multiversx_sdk-0.11.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a548b6896deb786d3ab528345b8cefabe96678696183f497922805afb901d88 |
|
MD5 | 41856e1b62ae1f5efceb740d14c420c3 |
|
BLAKE2b-256 | 788a048e32538fb0a89f9426810a07f805c103ce0446ec47dcb911036d041874 |