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

Uploaded Source

Built Distribution

codeowners-0.7.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: codeowners-0.7.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.8 Darwin/23.0.0

File hashes

Hashes for codeowners-0.7.0.tar.gz
Algorithm Hash digest
SHA256 a842647b20968c14da6066e4de4fffac4fd7c1c30de9cfa8b2fc8f534b3d9f48
MD5 a53a05711e5c39e55e21ce5592fa7b1a
BLAKE2b-256 7566ddba64473b0ce0b2c30cd0e1e32d923839834ed91948ad92bad23b2eadeb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codeowners-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.8 Darwin/23.0.0

File hashes

Hashes for codeowners-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0df5cd47299f984ba2e120dc4a0a7be68b528d53016ff39d06e86f85e33c7fc2
MD5 3c42b682de5ca91d56065b5d458db0a8
BLAKE2b-256 92d14091c351ac4de65fa22da912bdb395011e6dc8e630f070348b7b3fdd885d

See more details on using hashes here.

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