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.3.tar.gz
(26.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 scry_parse-1.0.3.tar.gz.
File metadata
- Download URL: scry_parse-1.0.3.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.10","id":"oracular","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc1ffbfbaf3b7fb2128a7dc6347598aa4b3f32661adae2151a7e49f901942362
|
|
| MD5 |
313803328c90f7cb81d2953985539bc9
|
|
| BLAKE2b-256 |
5400f0a7283f31d07be943f98f78bac884e7f90fb247b3f92732bd85a7477963
|
File details
Details for the file scry_parse-1.0.3-py3-none-any.whl.
File metadata
- Download URL: scry_parse-1.0.3-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.10","id":"oracular","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c283596418e6833af6f7fd02971ee82a0eea01f517d4473cd90aea6249e4dff
|
|
| MD5 |
918231604b7475d27ac4696b9fe3cf01
|
|
| BLAKE2b-256 |
4ca0ac94f989cd4fa0d4b5a0005c477d8072843a389f2e306adfb2d5e57a6543
|