Skip to main content

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


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.14.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

aleph_message-0.1.14-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file aleph-message-0.1.14.tar.gz.

File metadata

  • Download URL: aleph-message-0.1.14.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for aleph-message-0.1.14.tar.gz
Algorithm Hash digest
SHA256 8d4704d97b13593a9b140446fe6332c10ebd01362398b8b498588db149eebd19
MD5 f71a7296d6be5026eab7107dcc7875ab
BLAKE2b-256 7de66cb139155051e46685e96d739f2a7d1f696cdff1aa7e4d742df1847a59cc

See more details on using hashes here.

Provenance

File details

Details for the file aleph_message-0.1.14-py3-none-any.whl.

File metadata

  • Download URL: aleph_message-0.1.14-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for aleph_message-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 9fe7962af00bc10a411aa76e1ea1e53ac6924c99d8992db6f02dd7671f445763
MD5 4152abfee697f928c83a308eb82d1e12
BLAKE2b-256 85ee656ef6b535edc11014486b5227a973ec043b42d47f194b728e06f20999bb

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page