Reference Python validator for the Lace probe scripting language (parser + semantic checks, no runtime).
Project description
lacelang-validator (python)
Canonical Python validator for Lace — the reference implementation with 100% spec conformance.
This is the validator that the Lace specification is developed and tested against. All error codes, AST schemas, and validation rules are verified against this implementation before each spec release.
This package only parses and validates .lace source text. It has no
HTTP client and does not execute probes. The runtime and its network
surface live in the separate
lacelang-executor package, per
lace-spec.md §16.
Why split
Integrators that want syntax / semantic checking in a CI job, IDE
extension, or block editor shouldn't have to pull in an HTTP stack, TLS,
cookie state, or an extension dispatcher. Installing lacelang-validator
alone gives a clean audit surface with zero network exposure.
Install
pip install lacelang-validator
Or from source:
pip install git+https://github.com/tracedown/lacelang-python-validator.git
Usage
# Parse → emit AST, or { errors: [...] } on syntax failure
lacelang-validate parse script.lace
# Validate → emit { errors: [...], warnings: [...] }
lacelang-validate validate script.lace \
--vars-list vars.json \
--context context.json
# With an extension's field/function registrations active
lacelang-validate validate script.lace \
--enable-extension laceNotifications
# Pretty-print any subcommand
lacelang-validate parse script.lace --pretty
Exit code is always 0 on successful processing. Parse and validation
errors are reported in the JSON body. Non-zero exit codes are reserved
for tool failures (unreadable source file, malformed arguments).
Library usage
from lacelang_validator.parser import parse
from lacelang_validator.validator import validate
ast = parse(open("script.lace").read())
diagnostics = validate(
ast,
variables=["url"],
context={"maxRedirects": 10, "maxTimeoutMs": 300_000},
)
for err in diagnostics.errors:
print(err.code, err.call_index, err.field)
License
Apache License 2.0
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
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 lacelang_validator-0.1.0.tar.gz.
File metadata
- Download URL: lacelang_validator-0.1.0.tar.gz
- Upload date:
- Size: 27.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34edfb053dfe7a9448e25a6db0b02817e9655b57c22bff7fa71b10cca4c1c5f6
|
|
| MD5 |
bdaee7ddf28d1796ed20fde15a704c29
|
|
| BLAKE2b-256 |
a683ce0517e61ba8797b7a09af04790368f972bf5fb1a913f122b34c94499504
|
Provenance
The following attestation bundles were made for lacelang_validator-0.1.0.tar.gz:
Publisher:
release.yml on tracedown/lacelang-python-validator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lacelang_validator-0.1.0.tar.gz -
Subject digest:
34edfb053dfe7a9448e25a6db0b02817e9655b57c22bff7fa71b10cca4c1c5f6 - Sigstore transparency entry: 1361894763
- Sigstore integration time:
-
Permalink:
tracedown/lacelang-python-validator@229d3934b10e82bff1cf15410354db6d8c517298 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tracedown
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@229d3934b10e82bff1cf15410354db6d8c517298 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lacelang_validator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lacelang_validator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe3a96f87e2599fcf375cab4563b6f936f46299692f74a35b18b0489e440457c
|
|
| MD5 |
34523e29519ddb4548ade791930c99a4
|
|
| BLAKE2b-256 |
a351d451cced12376dc39ed5a8ceeb043682757d15da36df941a12a1d9b1640d
|
Provenance
The following attestation bundles were made for lacelang_validator-0.1.0-py3-none-any.whl:
Publisher:
release.yml on tracedown/lacelang-python-validator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lacelang_validator-0.1.0-py3-none-any.whl -
Subject digest:
fe3a96f87e2599fcf375cab4563b6f936f46299692f74a35b18b0489e440457c - Sigstore transparency entry: 1361894867
- Sigstore integration time:
-
Permalink:
tracedown/lacelang-python-validator@229d3934b10e82bff1cf15410354db6d8c517298 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tracedown
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@229d3934b10e82bff1cf15410354db6d8c517298 -
Trigger Event:
push
-
Statement type: