Metadata-Version: 2.4
Name: scry-parse
Version: 1.0.3
Summary: Python parser for scry-spec v1.0 markers
Project-URL: Repository, https://github.com/prmichaelsen/scry-parse-py
License: MIT License
        
        Copyright (c) 2026 reflection
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# scry-parse

Python parser for the [scry-spec v1.0](https://github.com/prmichaelsen/scry-spec) marker format.

## Install

```bash
uv pip install scry-parse
# or:
pip install scry-parse
```

## Usage

```python
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](LICENSE).
