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).
Release files for codeowners 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| codeowners-0.9.0.tar.gz | 41.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codeowners-0.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 50.2 kB
Release files / codeowners-0.9.0.tar.gz
| Download URL | codeowners-0.9.0.tar.gz |
|---|---|
| Size | 41.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
afa952d236c3c998b10ffddb5f92564becb27bd83cd3ce98f4566e83aa958e3c
|
|
BLAKE2b-256 checksum How to use checksums |
9dda494da11868328ada7260dfae6e535cf19b1117b05882626f4ecac8d5824f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / codeowners-0.9.0-py3-none-any.whl
| Download URL | codeowners-0.9.0-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28910812aeb60606c789a0dac7becdb39d7426719df4886a2ce11c9f3bab4360
|
|
BLAKE2b-256 checksum How to use checksums |
dec96f8ac752fa58998a28d0f84bc0d0048cba1c6153bee61839f0ee1aa0588b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|