Metadata-Version: 2.4
Name: occam-gitignore-core
Version: 0.1.2
Summary: Pure, deterministic core for occam-gitignore.
Project-URL: Homepage, https://github.com/fabriziosalmi/gitignore
Project-URL: Repository, https://github.com/fabriziosalmi/gitignore
Author: Fabrizio Salmi
License: MIT
Keywords: content-addressed,deterministic,gitignore
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# occam-gitignore-core

Pure, deterministic core for [`occam-gitignore`](https://pypi.org/project/occam-gitignore/).

This package contains only the algorithm: types, ports, fingerprinter,
generator. No I/O wrappers, no CLI, no network. The public-facing tool that
end users want is [`occam-gitignore`](https://pypi.org/project/occam-gitignore/) —
install that one with `pipx install occam-gitignore`.

This package is published separately so that other tools (IDE extensions,
servers, language ports) can depend on the algorithm without pulling the CLI
surface.

```python
from occam_gitignore_core import (
    DefaultFingerprinter,
    FileSystemTemplateRepository,
    GenerateOptions,
    JsonRulesTable,
    generate,
)

fp = DefaultFingerprinter().fingerprint(("pyproject.toml", "src/main.py"))
content = generate(
    fp,
    GenerateOptions(),
    templates=FileSystemTemplateRepository("data/templates"),
    rules_table=JsonRulesTable.from_file("data/rules_table.json"),
)
```

See https://github.com/fabriziosalmi/gitignore for the full project,
conformance suite, and specification.

MIT licensed.
