Risk graph generator (rgg)
This tool takes a CSV or YAML file with your observations and can output either a grid graph, or a donut ring. It also accepts a CSV or YAML file with recommendations to output a recommendations grid.
Rationale
I was fed-up with having to manually create these graphs for a client and I wanted to make my life easier. And since I want to increase my Python skills some more, this would be a fun little project to catch two birds with one stone.
Dependencies
- argparse (dev-python/argparse);
- matplotlib (dev-python/matplotlib);
- python (dev-lang/python).
Install
Using Pip:
pip install --user rgg
Usage
You can use rgg in two ways:
- When installed as package, call the installed script:
rgg --help. - When Git cloned, call the package directly from the root of the Git repository:
python -m src.rgg --help
$ rgg -h
usage: rgg [-h] (-iC INPUT_CSV_FILE | -iY INPUT_YAML_FILE) (-g | -d | -r)
[-oP OUTPUT_PNG_FILE] [--axis-labels AXIS_LABELS]
[--axis-arrows AXIS_ARROWS] [--legend LEGEND]
Converting scanning reports to a tabular format
optional arguments:
-h, --help show this help message and exit
-iC INPUT_CSV_FILE, --input-csv-file INPUT_CSV_FILE
specify an input CSV file (e.g. observations.csv).
-iY INPUT_YAML_FILE, --input-yaml-file INPUT_YAML_FILE
specify an input YAML file (e.g. observations.yml).
-g, --grid generate a risk grid graph.
-d, --donut generate a risk donut.
-r, --recommendations
generate a risk recommendations graph.
-oP OUTPUT_PNG_FILE, --output-png-file OUTPUT_PNG_FILE
specify an output PNG file (e.g. risk.png).
--axis-labels specify to print the axis labels
--axis-arrows specify to print arrows along the axis
Example
A few examples
Risk grid graph
To generate a risk grid graph: $ rgg -iC example/input/observations.csv -oP example/output/grid.png -g
Or if you prefer YAML: $ rgg -iY example/input/observations.yaml -oP example/output/grid.png -g
Risk donut
To generate a risk donut: $ rgg -iC example/input/observations.csv -oP example/output/donut.png -d
Or if you prefer YAML: $ rgg -iY example/input/observations.yaml -oP example/output/donut.png -d
Risk recommendations
To generate a recommendations graph: $ rgg -iC example/input/recommendations.csv -oP example/output/recommendations.png -r
Or if you prefer YAML: $ rgg -iY example/input/recommendations.yaml -oP example/output/recommendations.png -r
Metadata
Release files for rgg 0.0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rgg-0.0.11.tar.gz | 76.7 kB | Without provenance | Details for rgg-0.0.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rgg-0.0.11-py3-none-any.whl | Python 3 | none | any | Details for rgg-0.0.11-py3-none-any.whl |
Total release size: 152.3 kB
Release files / rgg-0.0.11.tar.gz
| Download URL | rgg-0.0.11.tar.gz |
|---|---|
| Size | 76.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f71c9e1642cbd6faecafb6eec3215c7f3fd62830260356151fbceeb56a684f2e
|
|
BLAKE2b-256 checksum How to use checksums |
50fc8dddd9173e0ae3c533a764706ee554847f13c3428db3c9def2f2ed07ce87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.24.1
|
Release files / rgg-0.0.11-py3-none-any.whl
| Download URL | rgg-0.0.11-py3-none-any.whl |
|---|---|
| Size | 75.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9fbdae2dd843a0be7ef0956edf73751acd4b138f56f6a9468c5e26f5a209b0f8
|
|
BLAKE2b-256 checksum How to use checksums |
d74556f1bef17d4c48de2911a3677ba25b0c07f83f45905a2b195833dec941ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.24.1
|
Security for rgg 0.0.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.