Skip to main content

Lightweight Python Client library for the Aleph.im network

Project description

aleph-sdk-python

Python SDK for the Aleph.im network, next generation network of decentralized big data applications.

Development follows the Aleph Whitepaper.

Documentation

The latest documentation, albeit incomplete, is available at https://docs.aleph.im/libraries/python-sdk/.

For the full documentation, please refer to the docstrings in the source code.

Requirements

Linux

Some cryptographic functionalities use curve secp256k1 and require installing libsecp256k1.

$ apt-get install -y python3-pip libsecp256k1-dev

Using some chains may also require installing libgmp3-dev.

macOs

This project does not support Python 3.12 on macOS. Please use Python 3.11 instead.

$ brew install secp256k1

Installation

Using pip and PyPI:

$ pip install aleph-sdk-python

Additional dependencies

Some functionalities require additional dependencies. They can be installed like this:

$ pip install aleph-sdk-python[solana, dns]

The following extra dependencies are available:

  • solana for Solana accounts and signatures
  • cosmos for Substrate/Cosmos accounts and signatures
  • nuls2 for NULS2 accounts and signatures
  • polkadot for Polkadot accounts and signatures
  • ledger for Ledger hardware wallet support, see Usage with LedgerHQ hardware
  • mqtt for MQTT-related functionalities, see examples/mqtt.py
  • docs for building the documentation, see Documentation
  • dns for DNS-related functionalities
  • all installs all extra dependencies

Installation for development

Setup a virtual environment using hatch:

$ hatch shell

Then install the SDK from source with all extra dependencies:

$ pip install -e .[all]

Running tests & Hatch scripts

You can use the test env defined for hatch to run the tests:

$ hatch run testing:run

See hatch env show for more information about all the environments and their scripts.

Generating the documentation [DEPRECATED]

The documentation is built using Sphinx.

To build the documentation, install the SDK with the docs extra dependencies:

$ pip install -e .[docs]

Then build the documentation:

$ cd docs
$ make html

Usage with LedgerHQ hardware

The SDK supports signatures using app-ethereum, the Ethereum app for the Ledger hardware wallets.

This has been tested successfully on Linux (amd64). Let us know if it works for you on other operating systems.

Using a Ledger device on Linux requires root access or the setup of udev rules.

Unlocking the device is required before using the relevant SDK functions.

Debian / Ubuntu

Install ledger-wallets-udev.

sudo apt-get install ledger-wallets-udev

On NixOS

Configure hardware.ledger.enable = true.

Other Linux systems

See https://github.com/LedgerHQ/udev-rules

Project details


Download files

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

Source Distribution

aleph_sdk_python-2.3.1.tar.gz (69.3 kB view details)

Uploaded Source

Built Distribution

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

aleph_sdk_python-2.3.1-py2.py3-none-any.whl (96.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file aleph_sdk_python-2.3.1.tar.gz.

File metadata

  • Download URL: aleph_sdk_python-2.3.1.tar.gz
  • Upload date:
  • Size: 69.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aleph_sdk_python-2.3.1.tar.gz
Algorithm Hash digest
SHA256 8c05f37e3aeb1e271815f4bdbcc329d09f96f839d53ef821067fff8a4a3e9391
MD5 678355c8052728c6dde07ecb302ac4f7
BLAKE2b-256 3b45b25e576431c3810be144fbd914d0ef296394670c95d74bd169e6edcb717f

See more details on using hashes here.

Provenance

The following attestation bundles were made for aleph_sdk_python-2.3.1.tar.gz:

Publisher: publish.yml on aleph-im/aleph-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aleph_sdk_python-2.3.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for aleph_sdk_python-2.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a27fcaac41aaf0ca03037aa5b90d7ac93f685a0db30494be757f5f0973c31064
MD5 52b8244a53870fb428583349fbddbbe1
BLAKE2b-256 81b3ebbcad73c2baa109b8c449e26fa1018891cf3b2e4c031658ccc773209583

See more details on using hashes here.

Provenance

The following attestation bundles were made for aleph_sdk_python-2.3.1-py2.py3-none-any.whl:

Publisher: publish.yml on aleph-im/aleph-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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