Skip to main content

A Python library to parse codeowner files

Project description

codeowners CircleCI pypi

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


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

codeowners-0.1.4-cp38-cp38-manylinux1_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.8

codeowners-0.1.4-cp37-cp37m-manylinux1_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.7m

codeowners-0.1.4-cp37-cp37m-macosx_10_7_x86_64.whl (499.9 kB view details)

Uploaded CPython 3.7mmacOS 10.7+ x86-64

codeowners-0.1.4-cp36-cp36m-manylinux1_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.6m

codeowners-0.1.4-cp35-cp35m-manylinux1_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.5m

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

Hashes for codeowners-0.1.4-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ad2e0a7395d6a4852e0f860ab01743ff282f14b1cf7b6ab5496044c6aae55604
MD5 8d9a58101b3452a7b713d861812a51eb
BLAKE2b-256 8dff3fdb40d3a80006e3d407895f0b1a0df25f89ff5fd2c1af0f25ad412df446

See more details on using hashes here.

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

Hashes for codeowners-0.1.4-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 026ac869db112c474dd9fe3e293b24bf95e27e05e36a50afc5ddd0af04b8e60c
MD5 7381901acc2ce1402d0a39d14e3f6abc
BLAKE2b-256 147c22f07c01a9cdb2760fe201f168131c6047f8a4e0afa79576d9e9b39ce33b

See more details on using hashes here.

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

Hashes for codeowners-0.1.4-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 b737f6e006cbe6c3ef95d4b5d2849a89aa441ef9fa804a3f315bd2fd1d525223
MD5 6ae00930ebdb29c2c897a27c88b29f15
BLAKE2b-256 e6857e9e70917e7e3709fbcbef0d982b02d1f7b25f255a8723ffc129f7544df6

See more details on using hashes here.

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

Hashes for codeowners-0.1.4-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 74075cced7424fead07a937d4208d10659137f2fc6436b52c8617c30aec85a5b
MD5 cae045c0335b48ce9c60dde421a04a80
BLAKE2b-256 cdfa3b99336025939dd45e66ccbce84c12abf986c049baff89c634d10d4cd3a0

See more details on using hashes here.

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

Hashes for codeowners-0.1.4-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8788e291ffc1409ba7b6ca8dae26a30e526f3a171fdd0e2e94a9afb170a1697d
MD5 dd2b78eb7fde3ec02da7a21b0a4331e9
BLAKE2b-256 93c2d68bd5d685d8d2ba6877b4bdf71e985c22313ca9b8aa715dc25972c2744e

See more details on using hashes here.

Supported by

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