Skip to main content

Reference Python implementation of LAR-1 semantic overlay

Project description

lar1semantic — LAR-1 Python SDK

Reference Python implementation of LAR-1 semantic overlay.

Install

pip install lar1semantic
# 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.1.tar.gz (5.8 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.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lar1semantic-0.3.1.tar.gz
  • Upload date:
  • Size: 5.8 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.1.tar.gz
Algorithm Hash digest
SHA256 001a80595cbbaa25ec404ff45851a82c2cf94d3d85a5949709db31d6be09a6cb
MD5 5cd7426b73d9eff7f459c5ce6c6c86d1
BLAKE2b-256 361a4577ba7689789f69f2e3ded0c60ef1862990959dd70342b02151ec9cdceb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lar1semantic-0.3.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ec69abdfae7824750a7ab5fb8b8bdc9d62c22124ef4d9e2d68d02a20c1d1876
MD5 e6ee4c9bcb943f625b54dee2b839b1e4
BLAKE2b-256 9e779f703f40cca38dea68474cd9f246a959ffc44786885961a09f23c969478c

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