Post Key Vault Secrets report to webhook
Project description
ops-py-reports
Payloads
Slack App
Creates Slack payload(s) from the provided title and body.
The title will be formatted as bold, while the body will be formatted as a Code block:
[{"text": f"*{title}*\n{body}"}]
- If the payload is too large it will be split into multiple parts (individual posts).
- If spilt, the provided title will be used for all posts.
- The part number will be appended to the title on each post.
- If spilt, the provided title will be used for all posts.
Reports
SlackMessages
Accepts a list of dicts and returns Slack Markdown formatted rows.
The get_ssl_report() method creates a message with a provided title in bold (defaults to SSL certificates report) .
If any of the provided rows of dicts contains a status key, the value of this key will be formatted according to the status value. Defaults to the following config:
{
"ok": {
"emoji": ":white_check_mark:",
"txt": "OK"
},
"warning": {
"emoji": ":warning:",
"txt": "WARNING"
},
"critical": {
"emoji": ":bangbang:",
"txt": "CRITICAL!"
},
"expired": {
"emoji": ":rotating_light:",
"txt": "EXPIRED!!"
},
"error": {
"emoji": ":no_entry:",
"txt": "ERROR"
},
"unknown": {
"emoji": ":question:",
"txt": "UNKNOWN"
}
}
The status will use the provided config to apply corresponding emoji and status text.
Markdown
Creates a plain text Markdown table from a list (rows) of lists (columns). The header is the first list in the list of rows.
HTMLTable
Creates a HTML table from a list (rows) of lists (columns). The header is the first list in the list of rows.
Styles
"grey": " style='background-color: Grey; color: White; font-weight:bold'"
"purple": " style='background-color: Purple; color: White; font-weight:bold'"
"yellow": " style='background-color: Yellow; color: Black; font-weight:bold'"
"red": " style='background-color: Red; color: White; font-weight:bold'"
"green": " style='background-color: Green; color: White; font-weight:bold'"
will be added to the cells which equals the following values:
"disabled": "grey"
"unknown": "grey"
"warning": "yellow"
"critical": "red"
"ok": "green"
"error": "red"
"expired": "red"
Functions
dict_to_rows
Converts a list of dicts to a list of a header and rows.
dict_to_csv
Converts a list of dicts to a comma separated csv text, with a header and rows.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ops_py_reports-0.5.0.tar.gz.
File metadata
- Download URL: ops_py_reports-0.5.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc3c4063be4387bb8fcebb8fe019c8eeb201fd4ddcad829532b0d5e0f598db9e
|
|
| MD5 |
7a178f7aee17b85798e418e59a8b3daf
|
|
| BLAKE2b-256 |
28745a612e8da64be7dd4198f708fdbfa6ba7c494c0dbca050b1e7367c057d34
|
Provenance
The following attestation bundles were made for ops_py_reports-0.5.0.tar.gz:
Publisher:
build_pypi.yml on equinor/ops-py-reports
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ops_py_reports-0.5.0.tar.gz -
Subject digest:
fc3c4063be4387bb8fcebb8fe019c8eeb201fd4ddcad829532b0d5e0f598db9e - Sigstore transparency entry: 152017165
- Sigstore integration time:
-
Permalink:
equinor/ops-py-reports@8c99cdd5cb3e3778bba6a9099446a7b0cf5234da -
Branch / Tag:
refs/heads/main - Owner: https://github.com/equinor
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_pypi.yml@8c99cdd5cb3e3778bba6a9099446a7b0cf5234da -
Trigger Event:
pull_request
-
Statement type:
File details
Details for the file ops_py_reports-0.5.0-py3-none-any.whl.
File metadata
- Download URL: ops_py_reports-0.5.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf8451adbdae4ac3a559366033979b979d0ee4747a3409d9e3f1260d1e44082b
|
|
| MD5 |
c130e9ccd00be28ea59598652500e45d
|
|
| BLAKE2b-256 |
1c04f77297067f560a78c032e966d0acec455d3a9c73d5c83c49b84adc564a5c
|
Provenance
The following attestation bundles were made for ops_py_reports-0.5.0-py3-none-any.whl:
Publisher:
build_pypi.yml on equinor/ops-py-reports
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ops_py_reports-0.5.0-py3-none-any.whl -
Subject digest:
bf8451adbdae4ac3a559366033979b979d0ee4747a3409d9e3f1260d1e44082b - Sigstore transparency entry: 152017166
- Sigstore integration time:
-
Permalink:
equinor/ops-py-reports@8c99cdd5cb3e3778bba6a9099446a7b0cf5234da -
Branch / Tag:
refs/heads/main - Owner: https://github.com/equinor
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_pypi.yml@8c99cdd5cb3e3778bba6a9099446a7b0cf5234da -
Trigger Event:
pull_request
-
Statement type: