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
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.1.tar.gz
(5.8 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.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
001a80595cbbaa25ec404ff45851a82c2cf94d3d85a5949709db31d6be09a6cb
|
|
| MD5 |
5cd7426b73d9eff7f459c5ce6c6c86d1
|
|
| BLAKE2b-256 |
361a4577ba7689789f69f2e3ded0c60ef1862990959dd70342b02151ec9cdceb
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ec69abdfae7824750a7ab5fb8b8bdc9d62c22124ef4d9e2d68d02a20c1d1876
|
|
| MD5 |
e6ee4c9bcb943f625b54dee2b839b1e4
|
|
| BLAKE2b-256 |
9e779f703f40cca38dea68474cd9f246a959ffc44786885961a09f23c969478c
|