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))
Metadata
Release files for aleph-message 1.7.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 | Provenance | Actions |
|---|---|---|---|---|
| aleph_message-1.7.0.tar.gz | 46.8 kB | With provenance | Details for aleph_message-1.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aleph_message-1.7.0-py3-none-any.whl | Python 3 | none | any | Details for aleph_message-1.7.0-py3-none-any.whl |
Total release size: 114.6 kB
Release files / aleph_message-1.7.0.tar.gz
| Download URL | aleph_message-1.7.0.tar.gz |
|---|---|
| Size | 46.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a650b54af20895f9e3b999c5d7e200049af48dd309425d808f7c28cbd443351b
|
|
BLAKE2b-256 checksum How to use checksums |
ab74563d74312091801a7a2b9aacf7964a77839e9a796af068cba4a585b2047c
|
| 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 29, 2026.
Transparency logRelease files / aleph_message-1.7.0-py3-none-any.whl
| Download URL | aleph_message-1.7.0-py3-none-any.whl |
|---|---|
| Size | 67.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9fc63d95364d54711ec94596af19f034c313c94b4f09355ce73126aa6dddd92c
|
|
BLAKE2b-256 checksum How to use checksums |
d9b296c7dcba2706c7c86b71525705066181f6520e416d4a5005bd67fa5ec107
|
| 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 29, 2026.
Transparency logSecurity for aleph-message 1.7.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for aleph_message-1.7.0.tar.gz
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 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.