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 --no-default-features
# trying a build in Python
./.venv/bin/pyo3-pack develop
./.venv/bin/python -c "import codeowners; print(codeowners.CodeOwners)"
Releasing a New Version
# bump version in Cargo.toml
# build the macos version
./.venv/bin/pyo3-pack build --release
# build the linux versions
# Note: this is just the version for the builder container
TAG="sbdchd/codeowners-builder:0.1.2"
docker build -f build.Dockerfile . --tag "$TAG"
# Note: building the Python versions can take a while if you are running Docker inside a VM
docker run --rm -v $(pwd):/io "$TAG" build --release
# upload wheels to PyPi
# Note: this will prompt for PyPi creds
./.venv/bin/twine upload --skip-existing target/wheels/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codeowners-0.1.4-cp38-cp38-manylinux1_x86_64.whl.
File metadata
- Download URL: codeowners-0.1.4-cp38-cp38-manylinux1_x86_64.whl
- Upload date:
- Size: 4.2 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad2e0a7395d6a4852e0f860ab01743ff282f14b1cf7b6ab5496044c6aae55604
|
|
| MD5 |
8d9a58101b3452a7b713d861812a51eb
|
|
| BLAKE2b-256 |
8dff3fdb40d3a80006e3d407895f0b1a0df25f89ff5fd2c1af0f25ad412df446
|
File details
Details for the file codeowners-0.1.4-cp37-cp37m-manylinux1_x86_64.whl.
File metadata
- Download URL: codeowners-0.1.4-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
026ac869db112c474dd9fe3e293b24bf95e27e05e36a50afc5ddd0af04b8e60c
|
|
| MD5 |
7381901acc2ce1402d0a39d14e3f6abc
|
|
| BLAKE2b-256 |
147c22f07c01a9cdb2760fe201f168131c6047f8a4e0afa79576d9e9b39ce33b
|
File details
Details for the file codeowners-0.1.4-cp37-cp37m-macosx_10_7_x86_64.whl.
File metadata
- Download URL: codeowners-0.1.4-cp37-cp37m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 499.9 kB
- Tags: CPython 3.7m, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b737f6e006cbe6c3ef95d4b5d2849a89aa441ef9fa804a3f315bd2fd1d525223
|
|
| MD5 |
6ae00930ebdb29c2c897a27c88b29f15
|
|
| BLAKE2b-256 |
e6857e9e70917e7e3709fbcbef0d982b02d1f7b25f255a8723ffc129f7544df6
|
File details
Details for the file codeowners-0.1.4-cp36-cp36m-manylinux1_x86_64.whl.
File metadata
- Download URL: codeowners-0.1.4-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74075cced7424fead07a937d4208d10659137f2fc6436b52c8617c30aec85a5b
|
|
| MD5 |
cae045c0335b48ce9c60dde421a04a80
|
|
| BLAKE2b-256 |
cdfa3b99336025939dd45e66ccbce84c12abf986c049baff89c634d10d4cd3a0
|
File details
Details for the file codeowners-0.1.4-cp35-cp35m-manylinux1_x86_64.whl.
File metadata
- Download URL: codeowners-0.1.4-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8788e291ffc1409ba7b6ca8dae26a30e526f3a171fdd0e2e94a9afb170a1697d
|
|
| MD5 |
dd2b78eb7fde3ec02da7a21b0a4331e9
|
|
| BLAKE2b-256 |
93c2d68bd5d685d8d2ba6877b4bdf71e985c22313ca9b8aa715dc25972c2744e
|