Skip to main content

Codeowners parser for Python

Project description

codeowners CircleCI 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 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

# update CHANGELOG.md

# commit release commit to GitHub

# build and publish
poetry publish --build

# create a release in the GitHub UI

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.5.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

codeowners-0.5.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file codeowners-0.5.0.tar.gz.

File metadata

  • Download URL: codeowners-0.5.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.7.3 Darwin/21.4.0

File hashes

Hashes for codeowners-0.5.0.tar.gz
Algorithm Hash digest
SHA256 d8def4eee6447b1d8605daab378ccb82774064b57728a2b55a1622b2e9df4e46
MD5 daf00d2c6df662f2332d6d432f89c33f
BLAKE2b-256 7e5e426f1624982960174ede85140b0e79b08b7cb05258ab5d0b512f4ec061ae

See more details on using hashes here.

File details

Details for the file codeowners-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: codeowners-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.7.3 Darwin/21.4.0

File hashes

Hashes for codeowners-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed0bca4d307d73b9ea0ac63bdb527c8c950973b3abce5a49add5602683c02de0
MD5 4b38d0de0288681b044da891bb8f21d0
BLAKE2b-256 4a8be02526ab05f4ed513799f4e7cf4a26ae36cd9ce75d441b07bb7418ca31e6

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