Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A Python library to parse codeowner files

Project description

codeowners

Python bindings to softprops's Rust codeowners library.

Why?

To allow Python users to parse codeowners files without having to rewrite an existing implementation.

Install

poetry add 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

cargo test

# trying a build in Python
poetry run pyo3-pack develop
poetry run python -c "import codeowners; print(codeowners.CodeOwners)"

Releasing a New Version

# bump version in Cargo.toml
poetry run pyo3-pack build --release
# Note: this will prompt for PyPi creds
poetry run pyo3-pack publish

Project details


Download files

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

Files for codeowners, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size codeowners-0.1.2-cp36-cp36m-manylinux1_x86_64.whl (988.6 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size codeowners-0.1.2-cp37-cp37m-macosx_10_7_x86_64.whl (458.7 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size codeowners-0.1.2-cp37-cp37m-manylinux1_x86_64.whl (988.4 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size codeowners-0.1.2.tar.gz (9.1 MB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page