Skip to main content

Kaspa Python SDK

Project description

Kaspa Python SDK

The Kaspa Python SDK provides bindings to Rust & Rusty-Kaspa source, allowing Python developers to interact with the Kaspa BlockDAG.

A native extension module, kaspa, is built from these bindings using PyO3 and Maturin.

[!IMPORTANT] This project has moved! Welcome to the new home of Kaspa Python SDK, which historically lived here.

Versions < 1.1.0 were built from the old repository.

Versions >= 1.1.0 are/will be built from this repository.

Features

This SDK provides features in two primary categories:

  • RPC Client — RPC API for the Kaspa node using WebSockets.
  • Wallet SDK — Bindings for wallet-related primitives such as key management, derivation, and transactions.
  • Managed Wallet — a fully managed interface for the Rusty Kaspa Wallet API bundled into one Python class.

This package strives to mirror the Kaspa WASM32 SDK from a feature and API perspective, while respecting Python conventions.

Most feature gaps with WASM32 SDK exist around Wallet functionality. Over time, features will be added to the Python SDK to bring it as close as possible.

Documentation

Full documentation is available on the documentation site, including (but not limited to):

The documentation site is versioned:

  • dev refers to the latest in main branch
  • latest refers to the most recent production release
  • Specific version tags are available

Documentation is not available for versions prior to 1.1.0. However, the API is very close, if not the exact same, for those versions and 1.1.0.

Quick Install

The Kaspa Python SDK is available on PyPi (link). As such, it can be installed from PyPi via:

pip install kaspa

Security-critical applications should consider building and installing from source. Instructions can be found here on the documentation site.

Example

A very basic RPC example:

import asyncio
from kaspa import Resolver, RpcClient

async def main():
    # Connect to Public Node Network (PNN) with Resolver
    client = RpcClient(resolver=Resolver())
    await client.connect()

    # Execute RPC Call
    print(await client.get_block_dag_info())

if __name__ == "__main__":
    asyncio.run(main())

Additional detailed examples can be found in the following locations:

Core Concepts & Contributing

The Contributing Guide details various technical core concepts and information about this project.

License

This project is licensed under the ISC License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

kaspa-2.0.1-cp314-cp314-win_amd64.whl (10.7 MB view details)

Uploaded CPython 3.14Windows x86-64

kaspa-2.0.1-cp314-cp314-manylinux_2_28_x86_64.whl (12.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

kaspa-2.0.1-cp314-cp314-manylinux_2_28_aarch64.whl (11.6 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ ARM64

kaspa-2.0.1-cp314-cp314-macosx_11_0_arm64.whl (9.6 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

kaspa-2.0.1-cp314-cp314-macosx_10_12_x86_64.whl (9.8 MB view details)

Uploaded CPython 3.14macOS 10.12+ x86-64

kaspa-2.0.1-cp313-cp313-win_amd64.whl (10.6 MB view details)

Uploaded CPython 3.13Windows x86-64

kaspa-2.0.1-cp313-cp313-manylinux_2_28_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

kaspa-2.0.1-cp313-cp313-manylinux_2_28_aarch64.whl (11.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

kaspa-2.0.1-cp313-cp313-macosx_11_0_arm64.whl (9.6 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

kaspa-2.0.1-cp313-cp313-macosx_10_12_x86_64.whl (9.8 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

kaspa-2.0.1-cp312-cp312-win_amd64.whl (10.6 MB view details)

Uploaded CPython 3.12Windows x86-64

kaspa-2.0.1-cp312-cp312-manylinux_2_28_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

kaspa-2.0.1-cp312-cp312-manylinux_2_28_aarch64.whl (11.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

kaspa-2.0.1-cp312-cp312-macosx_11_0_arm64.whl (9.6 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

kaspa-2.0.1-cp312-cp312-macosx_10_12_x86_64.whl (9.8 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

kaspa-2.0.1-cp311-cp311-win_amd64.whl (10.6 MB view details)

Uploaded CPython 3.11Windows x86-64

kaspa-2.0.1-cp311-cp311-manylinux_2_28_x86_64.whl (12.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

kaspa-2.0.1-cp311-cp311-manylinux_2_28_aarch64.whl (11.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

kaspa-2.0.1-cp311-cp311-macosx_11_0_arm64.whl (9.6 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

kaspa-2.0.1-cp311-cp311-macosx_10_12_x86_64.whl (9.8 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

kaspa-2.0.1-cp310-cp310-win_amd64.whl (10.6 MB view details)

Uploaded CPython 3.10Windows x86-64

kaspa-2.0.1-cp310-cp310-manylinux_2_28_x86_64.whl (12.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

kaspa-2.0.1-cp310-cp310-manylinux_2_28_aarch64.whl (11.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

kaspa-2.0.1-cp310-cp310-macosx_11_0_arm64.whl (9.6 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

kaspa-2.0.1-cp310-cp310-macosx_10_12_x86_64.whl (9.8 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file kaspa-2.0.1-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: kaspa-2.0.1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 10.7 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for kaspa-2.0.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 a9cc977a94134ae4f32d386181334f057bc6bceee37cdfc13d3c6bdcde111c3f
MD5 56d3f0938be174a4d90c09727a91dfdf
BLAKE2b-256 fa4932966701516b7c018bb220e2bf896d13320ed71711e2063f25a86275ca9e

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 940cad6dd086eb0d9b67bbd63d2c982335f924b4858a0b6d58b24f3768a95bf5
MD5 263b98f22aff3f2f76f1f2642a6a9f0f
BLAKE2b-256 a1590df85158d97f5dce91a3f782f801ac576010f0bb0c6a5014702ef3777121

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp314-cp314-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp314-cp314-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 55c3e1d19093b2ec9f8b5275c3cdde978d3863970a0b6f21e7e75095ef49870e
MD5 eacfee6b7f690e857227993ed0179921
BLAKE2b-256 f59b3afe1be2fca8bdf551ae7b7f645fe0f937b588f7fa6e9fd8bcca2827ebfc

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d408617eef7d2051ea07ebfc476d0086bb5897d2dbcf0b47ad7add24f0204e28
MD5 32dcfe3d82749b38ec6f3f9c7827d8ce
BLAKE2b-256 6e1e129592897e81161225c107b409a8a90d81f3c1fb6d4e924906c1ff85c2c3

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp314-cp314-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6e67c7fd2663d2aad8467f0a178ada23f9d2471a8484094012f4ead53b722842
MD5 6e7a6b96089d37d764273d690702c784
BLAKE2b-256 a0698db8aec6fb53f2720ec5b763d0ff8c697f40e9eea1407092bdc4c13bcbaf

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: kaspa-2.0.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 10.6 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for kaspa-2.0.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d50d50cffcad6490bc338cb913d2f6d42a335be413e58fc40f8b749e51259555
MD5 2a523f0561e3fea64ddef0a0cf708561
BLAKE2b-256 657cdff96ae3f78b78386405206f836ea8e6be89580572cc9ccb891307bbf1f3

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9f86c8a692851187bcb6a8ba575813a6f4f93f7c157457ff7fb4414613f6180b
MD5 b7fbc0404c1c8bba440583e0699d64c7
BLAKE2b-256 99acc0899c224d967c853f21d332482077f2c7423866c63908fa10ce63d288a7

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 39c11ddb6f498bcd84ea05d7e8cab151cba35af9afb0750c113d3f0310d75543
MD5 1f626f588a81bfba1b60727122bb6af9
BLAKE2b-256 75eb37a39e082f486a18a6e733be293097c3eb680c3f230659f427a86a7fdbb0

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 47b2cab6bbc1830db90c515612d773853b5f1b69fdce24a1a340aaec52527f68
MD5 970c0116b3429f9d698c29a8f0f055e4
BLAKE2b-256 8bf0aec7ff546a3104ad027a6636c5d951fecde63fefa4a21b722ddbb2de78f2

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9a7cce04a4c4ef4c7b9fe3d5e04537fcbf0999cbd414aa7f9cf45b3d1e8dd381
MD5 cfa8a2a43f2320d1ff04881a82106f03
BLAKE2b-256 0b583389684d97495a7f723696aefd397675ecf63166d092d79d73e2602611f4

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: kaspa-2.0.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 10.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for kaspa-2.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b48a3c4550e20e9d509bb8f472d131bd900758cbc3eaec8ef4ff1ed74292937b
MD5 8d4ee9b6fb456ab8673cb91e5209eb5e
BLAKE2b-256 543a1a677a4443982158a3c982cee7c3fdb0696d56e91e194f9929c60a45c573

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 53e59844270009e48fbac5ddf34f9210b6579a602a967e8f95150c3e3bacce31
MD5 ca90bc561738d318e98080ca0e48048c
BLAKE2b-256 1ab2d1e6f671024fc3b9bcba9300d12710ad62690cc52921980ce19fe01bc4e6

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1387c495ccdae1493860fd537fb5ae757bf4d45f2d86d77f11b0fa84f994b9c0
MD5 d95bf32b84ec5136165729fc3c3c9453
BLAKE2b-256 0354401a30767b7d32dc91ddeb3857eb69d19ba3b71e1e208a054f8a7c3d5752

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 149decaee445d3b92cec8a16e1a22cdc8eac4a48de3cf3ddc591735839c0285b
MD5 151c5882d78f43048b5ee3d9d7620e80
BLAKE2b-256 f5c28b2dce9e19920b60d14928ce08ce3660ba352f317293f4a7787b51254169

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5e8da18edd89d8ba4b206a07c05e4f29d5bfa0de73983f0987f377e042b56a47
MD5 1924d5f0e2a3d818adf1de1a6d194a9c
BLAKE2b-256 43a8b0ed0d594891fb1b94a65fec26fb17047c71d81e95ee8952db1bcf6780f2

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: kaspa-2.0.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 10.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for kaspa-2.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5fba6d1735f7306de2922ba9eb998a4a6c6003e8dcd57ac7642cc91b20731ab5
MD5 2d9518e8641c0402d3577299e70037a6
BLAKE2b-256 27408c0f6ddad1b2d20155ef0e12c20359921b3efa86044a7e7c3461a48a9c21

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1698750335926e98bb7e8732b0ad3d516d52363847f54b9a54ad5be24872ce0d
MD5 e938c7f44d7e57b526688bc58af0d13a
BLAKE2b-256 7675e3e55435203a747fc0c48a956ee44428f5f1b9670ff53dddf0536f556025

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fbad774f1ecdcca61a392d92414b49c0a08bc6686ea72c5ea39797dbd820c2fe
MD5 8345251d346c8a2eaf0da0025de35f5b
BLAKE2b-256 b2562ce345cba060c7a30240d7807936f053427d3db839918f4ede05229ff1f2

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 32972f1c182449469c4fdb2eea502d1aa7235ab1292f7aadf7892a9db046fe0b
MD5 00d572ac8159a8140e20059f46ef69d9
BLAKE2b-256 851c9f9026a8813a524ca7cdac95b398b677402551173727a7918ff2eed05b06

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e33d75499d65e445aa435b4fe48fe1b8678235a7500d1c71db26cac53801c3d8
MD5 82fc7bdb1d0032ea80c5cc0fd903876e
BLAKE2b-256 b1d07e3452aedb5d23cbe071e563f2b836f0f0e1b4eb60b9edd9cf12e1753828

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: kaspa-2.0.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 10.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for kaspa-2.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ca081749898b0eb4c470e3a48e12e3746e3b3d9674c2e642716650e2af6d61ee
MD5 6963f3f16d55d4cd1eff877934029fc9
BLAKE2b-256 338df0e2f7bacb29be6adfcf34b786dec60f8f88c9806397b9da1b946084b8b8

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cea8fd3cbd074e1d34cfe8a7ea19b43c9700f0cb6aeb635684c601b15327dd4b
MD5 515ebd7586f2a318c1716d218d6e645d
BLAKE2b-256 55d59971be02b32d88f79fcfbcc11c791b40c2882734939137e5fcb66269e9c3

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fc5f631f17d5cd50bad12ae4a61c1330d871be6966b80287f24bb7a4d30b04c3
MD5 0b2a94b2c267badacffbeec00a47dfda
BLAKE2b-256 249c883a7119c592601f1000c485cebbc780f96fc3086006681cb84fe8250db2

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 22da14553fb9f363c82eaf6d228f57db8f64ef842df06dd9c501bc0ef06d2f40
MD5 0f80fe757f971277e144770971b94b5d
BLAKE2b-256 31b42f3478cb00cb97c8d45a79e68b58b966b8316c1e386fcb289c32b7b57f64

See more details on using hashes here.

File details

Details for the file kaspa-2.0.1-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for kaspa-2.0.1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 af960100392995f187259b7ac0328abff041329bbcc4418c4bf8df39720b1482
MD5 554c59700938752485a628fbd1d42a06
BLAKE2b-256 e14188c2c341f4079d7873e5cb08aa93566cb2c4b6f9061e520558d0380f470b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page