Codeowners parser for Python
Project Links
Meta
Author: Steve Dignam
Requires Python: >=3.10
Classifiers
Programming Language
- Python :: 3
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Python :: 3.14
- Python :: 3.15
codeowners

Python codeowners parser based on softprops's Rust library and hmarr's Go library.
Why?
To allow Python users to parse codeowners files in Python.
Install
pip install codeowners
Usage
from codeowners import CodeOwners
example_file = """\
# owners for js files
*.js @ghost
# python
*.py user@example.com
# misc
/build/logs/ @dmin
docs/* docs@example.com
"""
owners = CodeOwners(example_file)
assert owners.of("test.js") == [('USERNAME', '@ghost')]
Dev
uv sync
s/test
s/lint
Releasing a New Version
# bump version in pyproject.toml
# update CHANGELOG.md
# commit release commit to GitHub
Then create a release in the GitHub UI. The Publish workflow builds the
package and uploads it to PyPI via trusted publishing
(OIDC, no API token).
0.9.0
Jun 28, 2026
0.8.0
Apr 26, 2025
0.7.0
Mar 07, 2024
0.6.0
Jul 22, 2022
0.5.0
May 14, 2022
0.4.1
Mar 26, 2022
0.4.0
Aug 24, 2021
0.3.0
Mar 16, 2021
0.2.1
Jan 28, 2021
0.2.0
Jan 24, 2021
0.1.4
Dec 08, 2020
0.1.3
Dec 08, 2020
0.1.2
Aug 03, 2019
0.1.1
Aug 03, 2019
0.1.0
Aug 03, 2019
Wheel compatibility matrix
Files in release
No dependencies