px
pypx

codeowners

v0.9.0

Codeowners parser for Python

9 KB Python 3.10+ py3-none-anyMIT
Diff
$ uv add codeowners

codeowners CI pypi

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 [email protected]
# misc
/build/logs/ @dmin
docs/*  [email protected]
"""

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).

Details

Version
0.9.0
License
MIT
Python
>=3.10
Maintainer
Steve Dignam <[email protected]>

Release Cadence

1
releases in the past year
avg 180 days between releases

Maintainers