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.0.tar.gz
(21.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.0.tar.gz.
File metadata
- Download URL: scry_parse-1.0.0.tar.gz
- Upload date:
- Size: 21.1 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 |
0fbe4f88201f637405a12b8df406f611f95e83c25ad02aa78566f49b354f4def
|
|
| MD5 |
368d0f7184364717a3cd93ffcf8c0fe5
|
|
| BLAKE2b-256 |
aa008e7549f2d00e4bcaf322c1edd9eba2d0b1bc8b04a65ce5c3a07c049f9592
|
File details
Details for the file scry_parse-1.0.0-py3-none-any.whl.
File metadata
- Download URL: scry_parse-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.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 |
16ae708cf423441d852f49224a8d6981bbf37a1bb21ec840aba3abcf7d7f99ef
|
|
| MD5 |
968ea48b44e028a09ab91028ead67bb0
|
|
| BLAKE2b-256 |
0fee96095c2e40967651a7c17ab2e3bc2fe49dd69d212548dd8014fc250bb8fe
|