Skip to main content

Codeowners parser for Python

Project description

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

uv sync

s/test

s/lint

Releasing a New Version

# bump version in pyproject.toml

# update CHANGELOG.md

# commit release commit to GitHub

Then create a release in the GitHub UI. The Publish workflow builds the package and uploads it to PyPI via trusted publishing (OIDC, no API token).

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.9.0.tar.gz (41.4 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.9.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: codeowners-0.9.0.tar.gz
  • Upload date:
  • Size: 41.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codeowners-0.9.0.tar.gz
Algorithm Hash digest
SHA256 afa952d236c3c998b10ffddb5f92564becb27bd83cd3ce98f4566e83aa958e3c
MD5 3938ddea744911c09e92ecd95de2fbe4
BLAKE2b-256 9dda494da11868328ada7260dfae6e535cf19b1117b05882626f4ecac8d5824f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codeowners-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codeowners-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28910812aeb60606c789a0dac7becdb39d7426719df4886a2ce11c9f3bab4360
MD5 88ccb2de14a1aa6e9755568e952a69f5
BLAKE2b-256 dec96f8ac752fa58998a28d0f84bc0d0048cba1c6153bee61839f0ee1aa0588b

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