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.1.20.tar.gz
(7.1 kB
view details)
Built Distribution
File details
Details for the file aleph-message-0.1.20.tar.gz
.
File metadata
- Download URL: aleph-message-0.1.20.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dacbad2afcfbe08ff8bc1bc5c28ce24eff824b98fcbac6faa48063132337bc45 |
|
MD5 | afb28886d56668b75b2f319eb1b0ec85 |
|
BLAKE2b-256 | aed37ec270b48f2ec4ccad2e058aa8053edaa214e5e31988caf4fb7c9b4f924b |
Provenance
File details
Details for the file aleph_message-0.1.20-py3-none-any.whl
.
File metadata
- Download URL: aleph_message-0.1.20-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3995791c0ac19ff9c293874743c58ee3b75a4ef7dc3c5e1930eecc888b93aed9 |
|
MD5 | 35de5161d8f1be253d49709ae1aa40f1 |
|
BLAKE2b-256 | a7a039bfeaf6aa2cbc23bd0ecf376135f05a13730dfa5c03443da11879105150 |