Skip to main content

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 squashfs-tools

macOs

brew tap cuber/homebrew-libsecp256k1 brew install libsecp256k1

Windows

We recommend using WSL (Windows Subsystem for Linux).

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:fmt

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. The CLI page is generated using the typer command. When releasing a new version, it's important to update the documentation as part of the release process.

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

Then, open a Pull Request (PR) on the aleph-docs repository with your changes.

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_client-1.6.1.tar.gz (69.3 kB view details)

Uploaded Source

Built Distribution

aleph_client-1.6.1-py3-none-any.whl (81.7 kB view details)

Uploaded Python 3

File details

Details for the file aleph_client-1.6.1.tar.gz.

File metadata

  • Download URL: aleph_client-1.6.1.tar.gz
  • Upload date:
  • Size: 69.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for aleph_client-1.6.1.tar.gz
Algorithm Hash digest
SHA256 c8a232362f3387c1923a64d6ebd0aeb77110348e9016bced1545f8f0066e87e7
MD5 6171f430c18a1f453ce499f66baeb3a8
BLAKE2b-256 0853d6ef83d2e312dcb4253681fba54939e3b000a563d76cd08668481592cacf

See more details on using hashes here.

File details

Details for the file aleph_client-1.6.1-py3-none-any.whl.

File metadata

  • Download URL: aleph_client-1.6.1-py3-none-any.whl
  • Upload date:
  • Size: 81.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for aleph_client-1.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d3a2631a45d56710cf810051ffb7398c49c76d9dd3a87da968d294c0457b3c54
MD5 231a927b81074050ef0a27d644289bdc
BLAKE2b-256 33146cb99108c6d8f2ddc1bb3bd9fe649e01bfd78a458de6a91d8d3723bddb94

See more details on using hashes here.

Supported by

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