Skip to main content

Codeowners parser for Python

Project description

codeowners CircleCI pypi

Python codeowners parser based on softprops's Rust codeowners 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

poetry install

s/test

s/lint

Releasing a New Version

# bump version in pyproject.toml

# build
poetry build -f wheel

# build and publish
poetry publish --build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codeowners-0.2.1.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

codeowners-0.2.1-py3-none-any.whl (23.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page