multiversx-sdk


Namemultiversx-sdk JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryThe MultiversX Python SDK.
upload_time2025-01-27 09:38:03
maintainerNone
docs_urlNone
authorMultiversX
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements pycryptodomex protobuf cryptography pynacl mnemonic requests ledgercomm
Travis-CI No Travis.
coveralls test coverage
            # 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

- [Cookbook](./examples/Cookbook.ipynb)
- [Auto-generated documentation](https://multiversx.github.io/mx-sdk-py/)

## 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:
```sh
coverage run -m pytest .
```

Then, we can generate a report in the terminal using:
```sh
coverage report
```

We can also generate a html report using:
```sh
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:
```bash
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**](/docs/conf.py) file should be updated accordingly.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "multiversx-sdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "MultiversX",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/de/99/08bf533e96907eadf824c15d1882a0d364a83f8c9018fcaf214d45dade87/multiversx_sdk-1.0.0.tar.gz",
    "platform": null,
    "description": "# mx-sdk-py\n\nThe 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.\n\n## Documentation\n\n- [Cookbook](./examples/Cookbook.ipynb)\n- [Auto-generated documentation](https://multiversx.github.io/mx-sdk-py/)\n\n## Development setup\n\n### Virtual environment\n\nCreate a virtual environment and install the dependencies:\n\n```\npython3 -m venv ./venv\nsource ./venv/bin/activate\npip install -r ./requirements.txt --upgrade\n```\n\nInstall development dependencies, as well:\n\n```\npip install -r ./requirements-dev.txt --upgrade\n```\n\nAllow `pre-commit` to automatically run on `git commit`:\n```\npre-commit install\n```\n\nAbove, `requirements.txt` should mirror the **dependencies** section of `pyproject.toml`.\n\nIf using VSCode, restart it or follow these steps:\n - `Ctrl + Shift + P`\n - _Select Interpreter_\n - Choose `./venv/bin/python`.\n\n### Tests\n\nRun the tests as follows:\n\nThis command runs all tests:\n```\npytest .\n```\n\nIf you want to skip network interaction tests run:\n```\npytest -m \"not networkInteraction\"\n```\n\nWe have some tests fetching mainnet transactions that are quite time consuming. To skip those, run this command:\n```\npytest -m \"not mainnet\"\n```\n\n### Generate test coverage report\n\nFirst, we run the tests using coverage:\n```sh\ncoverage run -m pytest .\n```\n\nThen, we can generate a report in the terminal using:\n```sh\ncoverage report\n```\n\nWe can also generate a html report using:\n```sh\ncoverage html\n```\n\n### Regenerating the docs\n\nEach 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:\n```bash\nsphinx-apidoc -f -o docs/ multiversx_sdk/ '*_test.py' '*constants.py'\n```\n\nThis command will regenerate the `.rst` files for each module, excluding the tests and the `constants.py` files.\n\nAlso, each time a new version is released, the [**conf.py**](/docs/conf.py) file should be updated accordingly.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "The MultiversX Python SDK.",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/multiversx/mx-sdk-py"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0315e3f5f1db669b4ccc4fcff832fa3b0a44215202f9097a8cb506dbc5be7a22",
                "md5": "6d2e78b8b5c6eef7aa39f507b6ecf918",
                "sha256": "911e19dddaf8ca15c88baf35a7768cc6d3ea6e551f847561a3edc2dc1377abfc"
            },
            "downloads": -1,
            "filename": "multiversx_sdk-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6d2e78b8b5c6eef7aa39f507b6ecf918",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 16228883,
            "upload_time": "2025-01-27T09:37:59",
            "upload_time_iso_8601": "2025-01-27T09:37:59.905978Z",
            "url": "https://files.pythonhosted.org/packages/03/15/e3f5f1db669b4ccc4fcff832fa3b0a44215202f9097a8cb506dbc5be7a22/multiversx_sdk-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "de9908bf533e96907eadf824c15d1882a0d364a83f8c9018fcaf214d45dade87",
                "md5": "7a0ff619c0da5bd80692641ed3c48097",
                "sha256": "ced0f3bc0f5b13e5b973d64e4f59c4ef6065913acf08f6df8961dc93c441086e"
            },
            "downloads": -1,
            "filename": "multiversx_sdk-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7a0ff619c0da5bd80692641ed3c48097",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 16135672,
            "upload_time": "2025-01-27T09:38:03",
            "upload_time_iso_8601": "2025-01-27T09:38:03.105070Z",
            "url": "https://files.pythonhosted.org/packages/de/99/08bf533e96907eadf824c15d1882a0d364a83f8c9018fcaf214d45dade87/multiversx_sdk-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-27 09:38:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "multiversx",
    "github_project": "mx-sdk-py",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "pycryptodomex",
            "specs": [
                [
                    "==",
                    "3.19.1"
                ]
            ]
        },
        {
            "name": "protobuf",
            "specs": [
                [
                    "<",
                    "6.0.0"
                ],
                [
                    ">=",
                    "5.27.2"
                ]
            ]
        },
        {
            "name": "cryptography",
            "specs": [
                [
                    "==",
                    "43.0.1"
                ]
            ]
        },
        {
            "name": "pynacl",
            "specs": [
                [
                    "==",
                    "1.5.0"
                ]
            ]
        },
        {
            "name": "mnemonic",
            "specs": [
                [
                    "==",
                    "0.21"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.32.0"
                ],
                [
                    "<",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "ledgercomm",
            "specs": []
        }
    ],
    "lcname": "multiversx-sdk"
}
        
Elapsed time: 0.39298s