Utilities to help make scripts
Project description
rv-script-utils
Script utilities to add in structured logging and support for healthchecks.io. See example of use in hello.py and in the example below.
from typing import Self
from rv_script_lib import ScriptBase
class HelloWorld(ScriptBase):
PARSER_ARGPARSE_KWARGS = {
"description": "Hello World",
}
def extraArgs(self: Self):
self.parser.add_argument(
"-m",
"--message",
type=str,
dest="message",
default="you forgot to add a message with -m/--message",
help="What do you want to say?",
)
def runJob(self: Self):
self.log.info("Hello from rv-script-utils!")
try:
raise RuntimeError("This is just a test")
except Exception as e:
self.log.exception(e)
self.log.warning("Warning, just for fun")
self.log.info(self.args.message)
if __name__ == "__main__":
myscript = HelloWorld()
myscript.run()
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 rv_script_utils-0.2.1.tar.gz.
File metadata
- Download URL: rv_script_utils-0.2.1.tar.gz
- Upload date:
- Size: 22.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81acaf7a692808b894386e911220541aadb12b4e17918f4c33e375c8aae9b4cd
|
|
| MD5 |
97926b82dbe6b4a14b53a882252f73b0
|
|
| BLAKE2b-256 |
bc81b3588d3b00879e2de878cc9e8f45de7dcdf9c1a95165528ab5d3f85315b1
|
Provenance
The following attestation bundles were made for rv_script_utils-0.2.1.tar.gz:
Publisher:
python-package.yml on rveachkc/rv-script-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rv_script_utils-0.2.1.tar.gz -
Subject digest:
81acaf7a692808b894386e911220541aadb12b4e17918f4c33e375c8aae9b4cd - Sigstore transparency entry: 157919264
- Sigstore integration time:
-
Permalink:
rveachkc/rv-script-utils@3b602bee125982015082ec14abbc7dc52b26c075 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/rveachkc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package.yml@3b602bee125982015082ec14abbc7dc52b26c075 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rv_script_utils-0.2.1-py3-none-any.whl.
File metadata
- Download URL: rv_script_utils-0.2.1-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d770b9bc680dcbc7b6eb91a7137ad581f213019893a4f19837cb45c06eb6e78d
|
|
| MD5 |
131b968fc8f55fe0d96b3685a800e7ef
|
|
| BLAKE2b-256 |
197ddbc8a4bfbcaf9ed0015f283dfa520604dfe7b7450ae3efb9d7882013d0b7
|
Provenance
The following attestation bundles were made for rv_script_utils-0.2.1-py3-none-any.whl:
Publisher:
python-package.yml on rveachkc/rv-script-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rv_script_utils-0.2.1-py3-none-any.whl -
Subject digest:
d770b9bc680dcbc7b6eb91a7137ad581f213019893a4f19837cb45c06eb6e78d - Sigstore transparency entry: 157919265
- Sigstore integration time:
-
Permalink:
rveachkc/rv-script-utils@3b602bee125982015082ec14abbc7dc52b26c075 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/rveachkc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package.yml@3b602bee125982015082ec14abbc7dc52b26c075 -
Trigger Event:
push
-
Statement type: