Python parser for scry-spec v1.0 markers
Project description
scry-parse
Python parser for the scry-spec v1.0 marker format.
Install
uv pip install scry-parse
# or:
pip install scry-parse
Usage
from scry_parse import parse_markers, validate_marker, mint_id, BASELINE_KINDS, BASELINE_STATUSES
# Parse markers from file content
with open("my_file.md") as f:
content = f.read()
result = parse_markers(content)
for entry in result.entries:
print(entry.id, entry.kind, entry.summary)
for anchor in result.anchors:
print(anchor.name, anchor.description)
for binding in result.bindings:
print(binding.local_id, binding.ref)
# Validate a parsed marker
vr = validate_marker(result.entries[0])
if not vr.valid:
print(vr.errors)
# Generate a new marker ID
entry_id = mint_id("design", "auth-flow") # random hash
entry_id = mint_id("design", "auth-flow", content) # deterministic hash
Supported comment styles
- HTML/Markdown:
<!-- @scry.entry ... @scry.entry.end --> - Python/Shell:
# @scry.entry ... # @scry.entry.end - TypeScript/JS:
// @scry.entry ... // @scry.entry.end - SQL:
-- @scry.entry ... -- @scry.entry.end - Lisp:
;; @scry.entry ... ;; @scry.entry.end
License
MIT — see LICENSE.
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
scry_parse-1.0.2.tar.gz
(25.1 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 scry_parse-1.0.2.tar.gz.
File metadata
- Download URL: scry_parse-1.0.2.tar.gz
- Upload date:
- Size: 25.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8371b6c326de4929054ce7d026d07c1cce5969c19903f8c6c7d27c9f2f64923
|
|
| MD5 |
50ed2eaa97c275b31020efcb032a88af
|
|
| BLAKE2b-256 |
88411a0a42752299f2cb0abdff5a6f5a78c9b66958325b0129ccaf223b60c2a5
|
File details
Details for the file scry_parse-1.0.2-py3-none-any.whl.
File metadata
- Download URL: scry_parse-1.0.2-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
643d7f457b81867736597316f784e9f5a670b6dfab1cd0dec584f6b77257f7e0
|
|
| MD5 |
c3922b6015117a245ea75c1e7d248f55
|
|
| BLAKE2b-256 |
1506049ecb633d8dba546730b7b1dc2b829093ee029e9b9b5045268b9ff20489
|