Skip to main content

Framework for writing Python package audits

Project description

License pypi CI CodeQL codecov.io readthedocs.org python3.8 black

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

PyPi

pip install pyaud

Development

poetry install

Usage

usage: pyaud [-h] [-c] [-f] [-n] [-s] [-t] [-v] [--rcfile RCFILE] [--version] MODULE

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

optional arguments:
  -h, --help       show this help message and exit
  -c, --clean      clean unversioned files prior to any process
  -f, --fix        suppress and fix all fixable issues
  -n, --no-cache   disable file caching
  -s, --suppress   continue without stopping for errors
  -t, --timed      track the length of time for each plugin
  -v, --verbose    incrementally increase logging verbosity
  --rcfile RCFILE  select file to override config hierarchy
  --version        show version and exit

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 of settings can be made with the following toml syntax files (overriding in this order):

~/.config/pyaud/pyaud.toml
~/.pyaudrc
.pyaudrc
pyproject.toml

A config can be generated with pyaud generate-rcfile

Prefix each key with tool.pyaud when using pyproject.toml

Project details


Release history Release notifications | RSS feed

This version

4.0.2

Download files

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

Source Distribution

pyaud-4.0.2.tar.gz (20.4 kB view hashes)

Uploaded Source

Built Distribution

pyaud-4.0.2-py3-none-any.whl (23.7 kB view hashes)

Uploaded Python 3

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