Aleph.im Message Specification
This library aims to provide an easy way to create, update and manipulate messages from Aleph.im.
It mainly consists in pydantic models that provide field type validation and IDE autocompletion for messages.
This library provides:
- schema validation when parsing messages.
- cryptographic hash validation that the
item_hashmatches the content of the message. - type validation using type checkers such as mypy in development environments.
- autocompletion support in development editors.
The item_hash is commonly used as unique message identifier on Aleph.im.
Cryptographic signatures are out of scope of this library and part of the aleph-sdk-python
project, due to their extended scope and dependency on cryptographic libraries.
This library is used in both client and node software of Aleph.im.
Usage
pip install aleph-message
import requests
from aleph_message import parse_message
from pydantic import ValidationError
ALEPH_API_SERVER = "https://official.aleph.cloud"
MESSAGE_ITEM_HASH = "9b21eb870d01bf64d23e1d4475e342c8f958fcd544adc37db07d8281da070b00"
message_dict = requests.get(ALEPH_API_SERVER + "/api/v0/messages.json?hashes=" + MESSAGE_ITEM_HASH).json()
try:
message = parse_message(message_dict["messages"][0])
print(message.sender)
except ValidationError as e:
print(e.json(indent=4))
Release files for aleph-message 1.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aleph_message-1.6.0.tar.gz | 44.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aleph_message-1.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 110.5 kB
Release files / aleph_message-1.6.0.tar.gz
| Download URL | aleph_message-1.6.0.tar.gz |
|---|---|
| Size | 44.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53d882331ffb7c35817003d237f190cd4e8c0e8d522f94df5758bb5d08e1937f
|
|
BLAKE2b-256 checksum How to use checksums |
d6d5cf773c9392fa566a56c772b382c4ef8f6ed6829f85af26f505e06a52d36a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency logRelease files / aleph_message-1.6.0-py3-none-any.whl
| Download URL | aleph_message-1.6.0-py3-none-any.whl |
|---|---|
| Size | 65.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5cc28417a7e6b8f9284a72b788c0db0580bfd78785c2376a09af85d802f85f1a
|
|
BLAKE2b-256 checksum How to use checksums |
cf0bdc840d67293d7deee253f4cc3862dba0cc695dadf4dc0c16c3132d7e6759
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency log