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.8.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.8.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: codeowners-0.8.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/24.4.0

File hashes

Hashes for codeowners-0.8.0.tar.gz
Algorithm Hash digest
SHA256 6505727574b67db4832a3d0d5e41c0f7eb80f8858ee27996e85b1e046f9266f8
MD5 e9898ed4d333441d039e871829042aaf
BLAKE2b-256 8098590929c83f921a75a3153bff3328e143ae900f757dffc722656b58003ba1

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for codeowners-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b92ce6f6c36dd9de5295c4dc285b2a3b14c81cae8b5eb3b05f0cfdbc4d93995a
MD5 447a003043297bf498e5ae3d9fa3ecc7
BLAKE2b-256 75e5ae08304853f5c6184292e9c679458623c937a2e33d98730ce30fa8f4a8b5

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