Metadata-Version: 2.4
Name: pycfgcut
Version: 0.3.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Telecommunications Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3 :: Only
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 :: Rust
Classifier: Topic :: System :: Networking
Classifier: Topic :: Software Development :: Libraries
License-File: LICENSE
Summary: Python bindings for cfgcut, the deterministic configuration slicer
Keywords: cfgcut,networking,automation
Home-Page: https://cfgcut.bedecarroll.com
Author: cfgcut maintainers
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://cfgcut.bedecarroll.com
Project-URL: Documentation, https://cfgcut.bedecarroll.com
Project-URL: Repository, https://github.com/bedecarroll/cfgcut
Project-URL: Changelog, https://github.com/bedecarroll/cfgcut/blob/main/CHANGELOG.md

# pycfgcut

Python bindings for [`cfgcut`](https://cfgcut.bedecarroll.com), the deterministic configuration slicer for network engineers.

## Installation

```bash
pip install pycfgcut
```

`pycfgcut` ships prebuilt wheels for CPython 3.9 and newer on Linux and macOS. If a wheel is unavailable for your platform `pip` falls back to building from source; make sure a compatible Rust toolchain is installed (`rustup` recommended).

## Usage

```python
from pathlib import Path

from pycfgcut import run_cfg

fixture = Path("sample.conf")
result = run_cfg(["interfaces|>>|"], [str(fixture)], anonymize=True, tokens=True)

if result["matched"]:
    print(result["stdout"])
```

Refer to the [cfgcut documentation](https://cfgcut.bedecarroll.com) for matcher semantics, anonymisation behaviour, and CLI parity guarantees.

## License

`pycfgcut` is distributed under the terms of the MIT License. See the top-level `LICENSE` file in this repository for the full text.

