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.0-cp314-cp314-win_amd64.whl (10.6 MB view details)

Uploaded CPython 3.14Windows x86-64

kaspa-2.0.0-cp314-cp314-manylinux_2_28_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.14manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.14macOS 10.12+ x86-64

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

Uploaded CPython 3.13Windows x86-64

kaspa-2.0.0-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.0-cp313-cp313-manylinux_2_28_aarch64.whl (11.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.12+ x86-64

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

Uploaded CPython 3.12Windows x86-64

kaspa-2.0.0-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.0-cp312-cp312-manylinux_2_28_aarch64.whl (11.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

kaspa-2.0.0-cp311-cp311-manylinux_2_28_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

kaspa-2.0.0-cp311-cp311-macosx_10_12_x86_64.whl (9.7 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

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

Uploaded CPython 3.10Windows x86-64

kaspa-2.0.0-cp310-cp310-manylinux_2_28_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

kaspa-2.0.0-cp310-cp310-macosx_10_12_x86_64.whl (9.7 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: kaspa-2.0.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 10.6 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.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 00b03b7da9f79eae69bd217458d663670cbc6811db12cd562de4bd2e64af76c1
MD5 df8239b418f00d8443b3a61170e3fe23
BLAKE2b-256 361488c242e9afc3ad7e52e10a4ddb160155485b180c73f191d4eeff76e1afb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 37ec11abfbcda9ecc2f68aaebef2b6cc9424921e9f86ac8eb1d18ff297075b88
MD5 c7e4ea9a3abda903d2bf5b7436b5fa10
BLAKE2b-256 a46160a6caa925f92ccba26e3ead015e5d0f1bf6f5da92615bff59b12d9c81f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp314-cp314-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9e173bc6f3ec960b4b18e984bd2b4e6af5151581bf149c28d35ab9522b6bb7a0
MD5 c1fc117409b8f7c4ef8a5ddf794157e4
BLAKE2b-256 c5b41d9eb168b4f7195fd2171059133b6d8bc51b173ca78f61b273ea99ad93c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3b510378ef6ef97b636adc8617f888eee1774e76b37cda7cbb494c34b646bec4
MD5 51d3197c0b40b4464851041f04a7c708
BLAKE2b-256 6aaf2d133b27b45791fedde9c6c562bd6286707aec282118f3e990a6e0f1385c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3243df023f2ce692506c118678f91a04ab022c4848c7c94b1053e8d65a52cb5d
MD5 168fa9beee2d3c02723b079f127b4ee0
BLAKE2b-256 d248e2376d8fe333643e62adbc18ef3df7bb30b6cf6207fcad5b021d376b2279

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kaspa-2.0.0-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.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 723784caec0a848c74e4e91e12e97758b26360429f27d0b62ef9713d9f6a7e86
MD5 fa67c46c976895cbc1157d4a5d9aac92
BLAKE2b-256 d6fe67c3b65896fdd693d2ef5cb592926e7c2443cff07c53be1f48c30f16e72d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a548b979632c817a10538af822c6b74ad11e64c371b1b39256356e6a76d37e04
MD5 22365f67ae3aebc61ae6c370a66bed56
BLAKE2b-256 085bd76ecfbee0b407f95aac2f07ed0679669912fc047ec4abe47b91d384be90

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ffb504e7264b1c322c09b1639d6007c19859629756aa18780140bec929f80dcc
MD5 3444a1b7c097be955f0a86639a9e6683
BLAKE2b-256 2aac671cf4d3b634a93d6a91f7463ebc13563bbe6f05c089fcfd337050d64591

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8e92c378603eaeed829158c09b2ae414e8a1ae5f83648a50c1373c141d05cb06
MD5 19582c572660f9f2076df24c27d631d3
BLAKE2b-256 b61313b7ba1c82509b9ef4aac06d217d3b20bfdb48419cb1233eb9a200b4a6f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4260eccb982433f5d6bdf0f6fedcd10c246d4e8c93a5c5a16a6e7e1ed17143ab
MD5 3e766f00c20fad59cfd90b15f3b02853
BLAKE2b-256 648220176efa32b8dd6dc660e7f501530fc5fc75b4c8a1a67515c73811d8d94f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kaspa-2.0.0-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.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0f50f9496b2cb12bc5796d021566a66a49f05f4730945d00f9f97b86b5667bce
MD5 f0ca3651cfb00bef2dab41a1f8770afd
BLAKE2b-256 bed41c85077ce744f1490f336a014444e694bffc1e5d1890836092b399d0977b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7c0e1095d94a80243922c44c8186ce6b51f5e4136c06aa82f9882bccc13f9632
MD5 07862646c7b3a7def392bf3510b2c75a
BLAKE2b-256 b1e5e2eb1542e80c1e50ca4bffeef40373dcfba6fba14941275dd960ac81e9a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b25c55871fc9efd5ca6f7729786f19f901629de5ec25cfd69e6c75e8acb54784
MD5 63c0c428fac8bff329484cb4348ab98b
BLAKE2b-256 f3c4686ad523f8d0252753b231f37d0b25316b6fe6996ecc03ff3a0cf0af4aa5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 471555a3e3066cecea825dd0e8fc6c6194cb071d704f4f25eb3e7fab60dd59b2
MD5 d9a10ac7cd5e83ce9d25164d448d2dca
BLAKE2b-256 9fd65c21f39b7f7ca9f9fa310d97cbc0bfa67cc04f6177cd6c186c914ce9cc03

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 52d1a9389212b51c9dee7761e97dd736b86dd004597089ed3913761e591fdad5
MD5 7c7824fe35c51e2c05cad22b4c256c73
BLAKE2b-256 8130bcc94dcb5af6139ca97afada3c56c8f3580a7033a179272a80e2b8e2133c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kaspa-2.0.0-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.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 00d02a448483c16f618f609670e67893f385ad7a24070f0522c6f34175d701e9
MD5 2ee55055286962f48da579d9ed4f4ae3
BLAKE2b-256 d22b46a3e8aad2306caaae04aa9b45c717995ff9f3119ca565ffdeb59330dd35

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f18469e7114cf8dc8e850a8f8cace4692541d054aff80e4257f39282249cb656
MD5 d6203c0e696282c240bc434443dbb6af
BLAKE2b-256 18e643dfe8a11453992a2ea883ff1ab5c24b444cdc5a5c291134fa99c841c525

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 717ad9bbbf81c794967e457ab583ed2d532cfb0223a51b6a3933cbcb72fe9ad0
MD5 9019cef9c181fd6226149d96bf58716f
BLAKE2b-256 acc1fe52ac963a161265dfe9b77f8d151fde196dea8a2db0f2639922b972b9c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8c8085b6d3abd9277f32f64581cd1ffabd4a144dc46e16dcae11a57f646408cc
MD5 c4eafb3a9793a55291e08a1fcc2e3dba
BLAKE2b-256 840107f3c5da5611cb67d7d47bc00eebc9d04474cc4a7afeff3e938df5fc1789

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9687c58e03ebbee05a90b84cf8437f8ce984a5c9300864a451d1c76e66b69708
MD5 ec60ddc91f66bc21e0e641e81ed1c2d6
BLAKE2b-256 1735040c004ba9dea35c13af0584ee66d89d10d9e49780d2bc060fc0fb6da6c0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kaspa-2.0.0-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.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a6e39e802a26292c3f529f5e2d14faf6a1bb0bc53e43f510708e7c317c2f4af0
MD5 2227655dd830043229a5ae743f29a8d0
BLAKE2b-256 8705a76eb98f80e365d3ac65323c21d103d9d1ec03859b8157123e8f84e3a5ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2dd5826fa43ca08b5aea9a2247a4a117ededf16beed00a6a873f7246252a95fa
MD5 c56e66ccaf8b547dfe056d4956d4b3c7
BLAKE2b-256 b4d64a4f0a46a4feb4e98dc683cc238feadc26e4ac083f810748199f5646e1c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e503ca6dcee3cf8d27076256f2be70c2ddc247563dbf05638099fe87eb2a3408
MD5 edc98a1fd865ba69d1ca36019a35287e
BLAKE2b-256 d73465c0d73297dbaa3b130b3270a14a5f94adba655f9b83d202e260b3ed1995

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3054cf68486aa58ee310400f3224e30e4ce170b7c158e499fc3dff470277afa1
MD5 5f66e8c67a623bbe8576d289499ad43f
BLAKE2b-256 85e820307d60eb399180115754e6aada26fa3e07d66d66445e1a9fe4a918c502

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kaspa-2.0.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 83794529a37369116421ebc5c3edf3627f4f6beab2edc7df5bac7d36ee89503e
MD5 b25cd220cee033a649a22354169bf494
BLAKE2b-256 35976d8fe6e247060f0833ea263f0152d3708bb11520457a3c8f552d8cff34fd

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