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.1.tar.gz (22.6 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.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file scry_parse-1.0.1.tar.gz.

File metadata

  • Download URL: scry_parse-1.0.1.tar.gz
  • Upload date:
  • Size: 22.6 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.1.tar.gz
Algorithm Hash digest
SHA256 ef8d5aa3f432035f85625c70053f0dbdbd6588f82ec07aec4e690068b89a8245
MD5 7c2d376dddea29a41342b46709850102
BLAKE2b-256 8c1de68f030e213daed5f4b3aa4d302257b9bb93aa28bbfa6c4b33b4cb7fa466

See more details on using hashes here.

File details

Details for the file scry_parse-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: scry_parse-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4512026b405e162ab0f19042d82d6b3149686e3b4368b255781d9f75aed22f63
MD5 3b1f77472e25eec9e15103d236f0a929
BLAKE2b-256 32bbfa1ef39adb365d640e58d96709b09b7b0df1192a0d0799c9ba34368df24e

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