Skip to main content

Reference Python implementation of LAR-1 semantic overlay

Project description

lar-1 (Python)

Reference Python implementation of LAR-1 v0.2 semantic overlay.

Install

pip install lar-1
# or from monorepo:
cd packages/lar1-python && pip install -e ".[dev]"

API

from lar1 import parse, validate, compact, serialize, deserialize_fields

data = parse("LAR:T=now,C=obs,L=0.9,V=verified_tool")
validate(data)  # True
compact(data)   # canonical LAR: string
serialize(data)  # application/lar+json

CLI

lar1 validate 'LAR:C=obs,L=0.9'
lar1 compact message.json
lar1 json 'LAR:T=now,C=inf,L=0.7'

Tests

pytest

Runs the same 74+ conformance fixtures as @lar-1/core.

License

MIT

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

lar1semantic-0.3.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lar1semantic-0.3.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file lar1semantic-0.3.0.tar.gz.

File metadata

  • Download URL: lar1semantic-0.3.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for lar1semantic-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a6c729095345718c5cb9ad7a17ac4cd4fc5e303d6388208f4414928362a88765
MD5 c44a41ca50bd51bac9bcc91efd8ea6c6
BLAKE2b-256 9b1cab20d27a20f4e27580c2cb248752f6fadbf36724a26f85ae97a3b7aee244

See more details on using hashes here.

File details

Details for the file lar1semantic-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: lar1semantic-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for lar1semantic-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2035006d7160d0986d9af7671830e1f345382043525cb2efa11ff0f7af9d424
MD5 5e3dd8f601046a21ab0c78ee7bc5c866
BLAKE2b-256 d700f6acce16498871d87c822079af1861a31b4762fe947314e1cbe9329535e2

See more details on using hashes here.

Supported by

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