Python Client library for the Aleph.im network
Project description
aleph-client
Python Client for the aleph.im network, next generation network of decentralized big data applications. Development follows the Aleph Whitepaper.
Documentation
Documentation can be found on https://docs.aleph.im/tools/aleph-client/
Requirements
Linux
Some cryptographic functionalities use curve secp256k1 and require installing libsecp256k1.
apt-get install -y python3-pip libsecp256k1-dev
macOs
brew tap cuber/homebrew-libsecp256k1 brew install libsecp256k1
Windows
The software is not tested on Windows, but should work using the Windows Subsystem for Linux (WSL).
Installation
From PyPI
Using pip and PyPI:
pip install aleph-client
Using a container
Use the Aleph client and it's CLI from within Docker or Podman with:
docker run --rm -ti -v $(pwd)/data:/data ghcr.io/aleph-im/aleph-client/aleph-client:master --help
Warning: This will use an ephemeral key pair that will be discarded when stopping the container
Installation for development
We recommend using hatch for development.
Hatch is a modern, extensible Python project manager. It creates a virtual environment for each project and manages dependencies.
pip install hatch
Running tests
hatch test
or
hatch run testing:cov
Formatting code
hatch run linting:format
Checking types
hatch run linting:typing
Publish to PyPI
hatch build hatch upload
If you want NULS2 support you will need to install nuls2-python (currently only available on github):
pip install aleph-sdk-python[nuls2]
To install from source and still be able to modify the source code:
pip install -e .
Updating the User Documentation
The user documentation for Aleph is maintained in the aleph-docs
repository. When releasing a new version, it's
important to update the documentation as part of the release process.
Steps for Updating Documentation
Documentation is generated using the typer
command.
If you have the aleph-docs
repository cloned as a sibling folder to your current directory, you can use the following
command to generate updated documentation:
./scripts/gendoc.py src/aleph_client/__main__.py docs --name aleph --title 'Aleph CLI Documentation' --output ../aleph-docs/docs/tools/aleph-client/usage.md
After generating the documentation, you may need to update the path for the private key, as this depends on the user
configuration. This can be fixed manually using the sed
command. For example:
sed -i 's#/home/olivier/.aleph-im/private-keys/sol2.key#~/.aleph-im/private-keys/ethereum.key#' ../aleph-docs/docs/tools/aleph-client/usage.md
This command replaces any hardcoded private key paths with the correct configuration path (
~/.aleph-im/private-keys/ethereum.key
).
Once the documentation is updated, open a Pull Request (PR) on the aleph-docs
repository with your changes.
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_client-1.3.0.tar.gz
.
File metadata
- Download URL: aleph_client-1.3.0.tar.gz
- Upload date:
- Size: 41.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 167a3ac135718f181b3e425d91f1be7248710898a4cda4244ef2ba831fed0c92 |
|
MD5 | 4ea561495bcaf933a781d5ad18841b80 |
|
BLAKE2b-256 | d750d4bfc3e20ace0c1ada6cd25d2c9561e7b6aa17fcc3cdecf4c5acb2811a5c |
File details
Details for the file aleph_client-1.3.0-py3-none-any.whl
.
File metadata
- Download URL: aleph_client-1.3.0-py3-none-any.whl
- Upload date:
- Size: 52.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d67d0eeadbefdedf64d45b63ff7839a865233deeff406089aca99edcf4ef7cf |
|
MD5 | a3de97ac4b4ed87188163f259ca4387a |
|
BLAKE2b-256 | dfc2861a1ba5ce6173870be9c2c3ff7707f4ce574fcec882f33880bb4508895a |