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 tap cuber/homebrew-libsecp256k1
$ brew install libsecp256k1
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 signaturescosmos
for Substrate/Cosmos accounts and signaturesnuls2
for NULS2 accounts and signaturespolkadot
for Polkadot accounts and signaturesledger
for Ledger hardware wallet support, see Usage with LedgerHQ hardwaremqtt
for MQTT-related functionalities, see examples/mqtt.pydocs
for building the documentation, see Documentationdns
for DNS-related functionalitiesall
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aleph_sdk_python-1.0.0rc2.tar.gz
.
File metadata
- Download URL: aleph_sdk_python-1.0.0rc2.tar.gz
- Upload date:
- Size: 40.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7b4258cbd0028741f6a922c1a36704e8c020f22f4e9be723047aafbc2c5fc80 |
|
MD5 | 214050f03d961535a83a941d094e43a6 |
|
BLAKE2b-256 | bb088f18125f6b0933b99097146dba11b90067db5e2bc2cf70f301f4dc60b9eb |
Provenance
File details
Details for the file aleph_sdk_python-1.0.0rc2-py2.py3-none-any.whl
.
File metadata
- Download URL: aleph_sdk_python-1.0.0rc2-py2.py3-none-any.whl
- Upload date:
- Size: 58.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35dd304a5871d7049cc322a9bb88b03ea8b01f5376731ed2f57715e8d6b8b9c5 |
|
MD5 | ef6244bef5897fd9354305532475b881 |
|
BLAKE2b-256 | 249f7cb91afcaf28919e310c8ac5924763023e586fa5cdd6db501f2c6b6d3d28 |