A Python library for parsing and working with CODEOWNERS files, typically used in Git repositories to define ownership for different parts of the codebase. It provides methods to identify the owners of specific file paths based on the rules defined in a CODEOWNERS file. The current version is 0.8.0. Releases are infrequent, usually for minor bug fixes or small feature additions.
pip install codeownersVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `Codeowners` parser and retrieve the owners for specific file paths. It creates a temporary CODEOWNERS file to illustrate usage.
Applications importing `Codeowners` will encounter an `ImportError`. To migrate, use the new parsing functions available under `codeowners.parser`. If the high-level `Codeowners` object is required, pin the library version to `<0.2.0`.
To avoid ambiguity and ensure the correct file is parsed, always explicitly provide the path to your CODEOWNERS file, e.g., `Codeowners('path/to/your/CODEOWNERS')`.Ensure your CODEOWNERS file is ordered correctly according to your desired ownership hierarchy. If results are unexpected, verify the precedence rules defined in the CODEOWNERS specification.
Ensure you use the correct capitalization when importing the main class: `from codeowners import CodeOwners`.
No dependency data recorded yet.