Metadata-Version: 2.4
Name: sc-lint
Version: 0.8.6
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: codespell>=2.2
Requires-Dist: pytest>=8,<9 ; extra == 'test'
Requires-Dist: rdflib>=7,<8 ; extra == 'test'
Requires-Dist: jinja2>=3.1,<4 ; extra == 'test'
Requires-Dist: pyyaml>=6,<7 ; extra == 'test'
Requires-Dist: sc-compose==1.5.0 ; extra == 'test'
Provides-Extra: test
License-File: LICENSE
Summary: Python bindings and repository helpers for the sc-lint Rust linting tool.
Keywords: rust,lint,static-analysis,code-quality,repository-policy
Home-Page: https://github.com/randlee/sc-lint
License-Expression: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/randlee/sc-lint
Project-URL: Repository, https://github.com/randlee/sc-lint
Project-URL: Documentation, https://github.com/randlee/sc-lint/blob/main/docs/sc-lint/python-bindings.md
Project-URL: Issues, https://github.com/randlee/sc-lint/issues
Project-URL: Changelog, https://github.com/randlee/sc-lint/blob/main/CHANGELOG.md

# sc-lint for Python

`sc-lint` on PyPI provides Python bindings for the Rust `sc-lint` CLI and the
repository-maintenance helper modules used by the project. It does not install
the Rust CLI executables. Install those separately with Homebrew or from
[GitHub Releases](https://github.com/randlee/sc-lint/releases).

Current release: **0.8.6**. Python 3.9 or newer is required (3.11 or newer on
Windows ARM64).

## Install

```bash
python -m pip install sc-lint
```

The Python package includes the native extension and the `sc_lint` Python
package. Its `codespell>=2.2` dependency supports the repository spell-check
helper; the package does not expose a `sc-lint` console script.

## Python API

The native module exposes three public helpers:

```python
import sc_lint

# JSON string with the bound sc-lint version.
version = sc_lint.version_json()

# Run the CLI in-process; argv[0] is the program name.
exit_code = sc_lint.run(["sc-lint", "version"])

# Resolve the product executable from SC_LINT_BIN, the managed install
# directory, or PATH. Raises FileNotFoundError if no executable is found.
binary = sc_lint.binary_path()
```

`run(argv)` returns the CLI exit code instead of terminating the Python
interpreter. It does not add a command-line entry point to the wheel.

The native extension also provides `toml_loads(text)`, which the helper modules
use so TOML is parsed by the same Rust parser as the CLI on every supported
Python version.

## Links

- [Python bindings contract](https://github.com/randlee/sc-lint/blob/main/docs/sc-lint/python-bindings.md)
- [sc-lint operator manual](https://github.com/randlee/sc-lint/tree/main/docs-bundle)
- [Source repository](https://github.com/randlee/sc-lint)
- [Issue tracker](https://github.com/randlee/sc-lint/issues)
- [Changelog](https://github.com/randlee/sc-lint/blob/main/CHANGELOG.md)
- [MIT license](https://github.com/randlee/sc-lint/blob/main/bindings/sc-lint-py/LICENSE)

