Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scry_parse-1.0.3-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

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

Hashes for scry_parse-1.0.3.tar.gz
Algorithm Hash digest
SHA256 bc1ffbfbaf3b7fb2128a7dc6347598aa4b3f32661adae2151a7e49f901942362
MD5 313803328c90f7cb81d2953985539bc9
BLAKE2b-256 5400f0a7283f31d07be943f98f78bac884e7f90fb247b3f92732bd85a7477963

See more details on using hashes here.

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

Hashes for scry_parse-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7c283596418e6833af6f7fd02971ee82a0eea01f517d4473cd90aea6249e4dff
MD5 918231604b7475d27ac4696b9fe3cf01
BLAKE2b-256 4ca0ac94f989cd4fa0d4b5a0005c477d8072843a389f2e306adfb2d5e57a6543

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page