Aleph.im message specification
Project description
Aleph.im Message Specification
This library aims to provide an easy way to create, update and validate messages from Aleph.im.
It mainly consists in pydantic models that provide field type validation and IDE autocompletion for messages.
Status
Currently, only basic type validation is included. Advanced data and signature validation is not included.
In the future, this library would be useful within other projects such as the client library aleph-client.
Usage
import requests
from aleph_message import Message
from pydantic import ValidationError
message_dict = requests.get(ALEPH_API_SERVER + "/api/v0/messages.json?hashes=...").json()
try:
message = Message(**message_dict)
print(message.sender)
except ValidationError as e:
print(e.json())
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
aleph-message-0.2.3.tar.gz
(8.7 kB
view details)
Built Distribution
File details
Details for the file aleph-message-0.2.3.tar.gz
.
File metadata
- Download URL: aleph-message-0.2.3.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1850eeea3b7a7841fc8aaa569bc5b7d96ea3eb1926a6c15b64e173cb9c7ce389 |
|
MD5 | 78ec3db4490a5f2b73536e5df2196df6 |
|
BLAKE2b-256 | e6058c06b18fee09a09d9aa55138cf72daea2420b22f77f1734ec1b03bdc175c |
Provenance
File details
Details for the file aleph_message-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: aleph_message-0.2.3-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7167af0cd03a423977f89d312c299508f55eacf1f9aee8dc5515b50edd465fe |
|
MD5 | 77cbedf3728202c007e797e169860e41 |
|
BLAKE2b-256 | f718cc448dd61823cba6803de2ba1bcb66b81553f2f72708d916da1695ec5037 |