Python Client library for the Aleph Cloud network
Project description
aleph-client
The official command-line interface (CLI) for Aleph Cloud — a decentralized cloud computing platform.
What is Aleph Cloud?
Aleph Cloud provides decentralized computing, storage, and indexing services. With aleph-client, you can:
- Deploy VMs (Instances) — Run persistent virtual machines on decentralized infrastructure
- Deploy Functions (Programs) — Deploy serverless functions that scale automatically
- Store Data — Upload files and data to decentralized storage
- Send Messages — Post, aggregate, and forget messages on the Aleph network
- Manage Domains — Configure custom domains for your deployments
Quick Start
Installation
# Install from PyPI
pip install aleph-client
# Verify installation
aleph --help
Create Your First Instance
# Create a new account (generates keys)
aleph account create
# Deploy an Ubuntu instance with pay-as-you-go credits
aleph instance create --payment-type=credit --name="my-first-vm"
# List your instances
aleph instance list
# SSH into your instance
ssh root@<ipv6-address>
Deploy a Serverless Function
# Create a simple FastAPI app
mkdir my-app && cd my-app
cat > main.py << 'EOF'
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def hello():
return {"message": "Hello from Aleph Cloud!"}
EOF
# Deploy it
aleph program upload . main:app --name="my-function"
Store Data
# Upload a file
aleph file upload myfile.txt
# Pin existing content by hash
aleph file pin QmYourContentHash
Commands Overview
| Command | Description |
|---|---|
aleph account |
Manage accounts and keys |
aleph instance |
Manage virtual machines (create, list, delete, logs) |
aleph program |
Deploy serverless functions |
aleph file |
Upload and manage files |
aleph message |
Send messages to the network |
aleph aggregate |
Manage key-value aggregates |
aleph domain |
Configure custom domains |
aleph node |
Interact with Compute Resource Nodes |
aleph credits |
Check credit balance |
aleph pricing |
View compute pricing |
Run aleph <command> --help for detailed usage of each command.
Payment Options
Aleph Cloud supports multiple payment methods:
- Credits (Pay-as-you-go) — No token staking required, pay only for what you use
- Hold — Stake ALEPH tokens for allocation
- Superfluid — Stream payments for continuous services
- NFT — Use NFT vouchers for payment
Documentation
- Full Documentation: https://docs.aleph.cloud/devhub/sdks-and-tools/aleph-cli/
- API Reference: https://docs.aleph.cloud/devhub/api/
- Tutorials: https://docs.aleph.cloud/devhub/tutorials/
Requirements
Linux
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).
Using Docker
Run the CLI without installing locally:
docker run --rm -ti -v $(pwd)/data:/data ghcr.io/aleph-im/aleph-client/aleph-client:master --help
Note: This uses an ephemeral key pair that is discarded when the container stops.
Development
Setup
We use hatch for development:
pip install hatch
Running Tests
hatch test
# or with coverage
hatch run testing:cov
Code Quality
# Format code
hatch run linting:fmt
# Type checking
hatch run linting:typing
Publishing
hatch build
hatch upload
Additional Chains
For NULS2 support:
pip install aleph-sdk-python[nuls2]
Contributing
Contributions are welcome! Please see our contribution guidelines and open a pull request.
Links
- Website: https://aleph.cloud
- Documentation: https://docs.aleph.cloud
- GitHub: https://github.com/aleph-im
- Discord: https://discord.gg/aleph-im
- Twitter: https://twitter.com/alaboratory
License
MIT License - see LICENSE for details.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aleph_client-1.9.1.tar.gz.
File metadata
- Download URL: aleph_client-1.9.1.tar.gz
- Upload date:
- Size: 84.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f831b5ccb1045fbc6d94d25a03a9c0ebdbaea936e2543047e2a959c994df189
|
|
| MD5 |
aa32f4656508f8ce44164614742facab
|
|
| BLAKE2b-256 |
ce3eb27ac18f2328d201e3785ea039730a8707d3eec27a862c17bfb9c62ec292
|
File details
Details for the file aleph_client-1.9.1-py3-none-any.whl.
File metadata
- Download URL: aleph_client-1.9.1-py3-none-any.whl
- Upload date:
- Size: 98.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2ebd06349cef1c6e0793985733c014f03018e6709e891397ab9cf6e5ef2955a
|
|
| MD5 |
634b31951b112b7e29925c3fae5dfe12
|
|
| BLAKE2b-256 |
c93c2527d515a09e28a1ff6008af7c2bd434e153a1687193e7eda46193fdaffd
|