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
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
lar1semantic-0.3.0.tar.gz
(5.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6c729095345718c5cb9ad7a17ac4cd4fc5e303d6388208f4414928362a88765
|
|
| MD5 |
c44a41ca50bd51bac9bcc91efd8ea6c6
|
|
| BLAKE2b-256 |
9b1cab20d27a20f4e27580c2cb248752f6fadbf36724a26f85ae97a3b7aee244
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2035006d7160d0986d9af7671830e1f345382043525cb2efa11ff0f7af9d424
|
|
| MD5 |
5e3dd8f601046a21ab0c78ee7bc5c866
|
|
| BLAKE2b-256 |
d700f6acce16498871d87c822079af1861a31b4762fe947314e1cbe9329535e2
|