Installation¶
This Python package can be installed from PyPi or built from source.
Security Warning
With any crypto development library, it is always recommended to build from trusted source code.
Requirements¶
- Python versions 3.10 thru 3.14 are supported
- pip package manager
Installation via PyPi¶
The following OS/architectures have pre-built wheels available on PyPi:
| Platform | Architecture | Status |
|---|---|---|
| Linux | x86_64 | Supported |
| Linux | aarch64 | Supported |
| macOS | x86_64 | Supported |
| macOS | Apple Silicon (arm64) | Supported |
| Windows | x86_64 | Supported |
Support for alternate targets will require building from source. Building from sdist is not yet supported, as such an sdist is not available on PyPi.
Installation from Source¶
-
To build the Python SDK from source, the full rusty-kaspa build environment is required. Follow set up instructions in the Installation section of Rusty Kaspa README.
-
Clone the Kaspa Python SDK repository:
-
Run
./build-releaseshell script to build source and built (wheel) dists. The built wheel (.whl) file path will be printed:Built wheel for CPython 3.x to <filepath>. The.whlfile can be copied to another location or machine (of the same OS/architecture). -
Install the wheel built by the prior step using
pip install <.whl filepath>.
Optional Dependencies¶
Development (and testing)¶
pip install kaspa[dev] # Installs from PyPi pyproject.toml
pip install -e ".[dev]" # Installs from local pyproject.toml
This includes pytest and pytest-asyncio for running tests.
Documentation¶
pip install kaspa[docs] # Installs from PyPi pyproject.toml
pip install -e ".[docs]" # Installs from local pyproject.toml
This includes MkDocs related packages for generating this documentation website.