Skip to main content

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

Allow pre-commit to automatically run on git commit:

pre-commit install

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"

We have some tests fetching mainnet transactions that are quite time consuming. To skip those, run this command:

pytest -m "not mainnet"

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

Re-generate 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.

Re-generate protobuf files:

protoc multiversx_sdk/core/proto/transaction.proto --python_out=. --pyi_out=.

Note that protoc must be installed beforehand. Use the same version as the one referenced in requirements.txt. For example, if we reference protobuf==5.29.4 in requirements.txt, then use protobuf v29.4.

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-3.0.1.tar.gz (16.1 MB view details)

Uploaded Source

Built Distribution

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

multiversx_sdk-3.0.1-py3-none-any.whl (16.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: multiversx_sdk-3.0.1.tar.gz
  • Upload date:
  • Size: 16.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for multiversx_sdk-3.0.1.tar.gz
Algorithm Hash digest
SHA256 f3dbfcc1758fcd62c259bef6e3ead08c03b7deb5235996ed726c977b718e9eff
MD5 d4b260c050a8dd8d4150c080f698bb3d
BLAKE2b-256 cadf0c695fdc3f3bd4e7f9e914128c35e683281f9063a177e30a24136cea7662

See more details on using hashes here.

File details

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

File metadata

  • Download URL: multiversx_sdk-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for multiversx_sdk-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 965319d3b4e347f2ddca3f1eddf77fe39859a97ab6f7acb6d6ade739fa309512
MD5 66a68cac36dd00762e67739b508d1625
BLAKE2b-256 ae394e2709ee3766fb7e25d875d8595acb79d81633a0ba6d9d96b35eaca6893c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 files

3.0.0

2 files

2.4.0

2 files

2.3.4

2 files

2.3.3

2 files

2.3.2

2 files

2.3.1

2 files

2.3.0

2 files

2.2.0

2 files

2.1.0

2 files

2.0.1

2 files

2.0.0

2 files

1.6.3

2 files

1.6.2

2 files

1.6.1

2 files

1.6.0

2 files

1.5.4

2 files

1.5.3

2 files

1.5.2

2 files

1.5.1

2 files

1.5.0

2 files

1.4.0

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

0.19.0

2 files

0.18.0

2 files

0.17.0

2 files

0.16.3

2 files

0.16.2

2 files

0.16.1

2 files

0.16.0

2 files

0.15.0

2 files

0.14.0

2 files

0.13.2

2 files

0.13.1

2 files

0.13.0

2 files

0.12.0

2 files

0.11.1

2 files

0.11.0

2 files

0.10.1

2 files

0.10.0

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page