Skip to main content

lacelang-validator (python)

PyPI

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

Release files for lacelang-validator 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lacelang-validator 0.2.1
File Size Uploaded
lacelang_validator-0.2.1.tar.gz 28.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lacelang-validator 0.2.1
File Interpreter ABI Platform
lacelang_validator-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 53.2 kB

Release files / lacelang_validator-0.2.1.tar.gz

Download URL lacelang_validator-0.2.1.tar.gz
Size 28.2 kB
Tags Source
SHA-256 checksum
How to use checksums
39bb95e944980aea34b3cbd2099cce304be4dd82aed4d8ed96e91b1ac6a098ea
BLAKE2b-256 checksum
How to use checksums
50bd080d32ac3662d0e14970c30c5a1ae3bca1504332d426f55f93b6e20b4db7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / lacelang_validator-0.2.1-py3-none-any.whl

Download URL lacelang_validator-0.2.1-py3-none-any.whl
Size 25.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a231a9e5ca4c0c9e718700c425e58e34068c31e023f47bd01b6bafdf508ef46
BLAKE2b-256 checksum
How to use checksums
774b94ee1563d496ded0aeffc7826c8a3c6c802fe4b2e81de710f75a5900f226
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page