Skip to main content

Framework for writing Python package audits

Project description

License PyPI Build CodeQL pre-commit.ci status codecov.io readthedocs.org python3.9 Black isort docformatter pylint Security Status Known Vulnerabilities pyaud

Framework for writing Python package audits

The pyaud framework is designed for writing modular audits for Python packages

Audits can be run to fail, such as when using CI, or include a fix

Fixes can be written for whole directories or individual files

Plugins can be written for manipulating files

Supports single script plugins

Installation

$ pip install pyaud

Usage

Commandline

usage: pyaud [-h] [-v] [-f] [-n] [-s] [--audit LIST] [--exclude EXCLUDE] MODULE

positional arguments:
  MODULE             choice of module: [modules] to list all

optional arguments:
  -h, --help         show this help message and exit
  -v, --version      show program's version number and exit
  -f, --fix          suppress and fix all fixable issues
  -n, --no-cache     disable file caching
  -s, --suppress     continue without stopping for errors
  --audit LIST       comma separated list of plugins for audit
  --exclude EXCLUDE  regex of paths to ignore

Plugins

pyaud will search for a plugins package in the project root

To register a plugin package ensure it is importable and prefix the package with pyaud_

The name pyaud_plugins is reserved and will be automatically imported

To view available plugins see pyaud-plugins README or run pyaud modules all

For writing plugins see docs

Configure

Configuration values are declared in the pyproject.toml file

[tool.pyaud]
audit = [
  "commit-policy",
  "const",
  "docs",
  "files",
  "format",
  "format-docs",
  "format-str",
  "imports",
  "lint",
  "params",
  "test",
  "typecheck",
  "unused"
]
exclude = '''
(?x)^(
  | docs\/conf\.py
  | whitelist\.py
)$
'''

Project details


Release history Release notifications | RSS feed

This version

8.0.0

Download files

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

Source Distribution

pyaud-8.0.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

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

pyaud-8.0.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file pyaud-8.0.0.tar.gz.

File metadata

  • Download URL: pyaud-8.0.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.3 Darwin/24.5.0

File hashes

Hashes for pyaud-8.0.0.tar.gz
Algorithm Hash digest
SHA256 0482f9455be5f8ae37e82b101584cdd4dd499f82d40cf8f35dc21f8761dfd11e
MD5 12ea1b961e6f450021229e5d19275c40
BLAKE2b-256 f1e699c6c398fce8fdca9d5fefe005b801179b26eeef5a7f236de84c20d38d3c

See more details on using hashes here.

File details

Details for the file pyaud-8.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyaud-8.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.3 Darwin/24.5.0

File hashes

Hashes for pyaud-8.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 806cde9b138b89a0768f6fdc3ca8d18ae04ac887dfb81eb5474e5b84038cf0da
MD5 761fb143ef66c03a8215624481a8377c
BLAKE2b-256 099ec999fe0d8e46996c29cf501a5403dbd7d0c144eccca79206188a5fae734b

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