Helper package for H2H Task images.
Project description
common-harness-lib
[H2H Toolkit] Common python library for harness functions within task docker images.
Usage:
Create object with CommonHarnessLib()
. To disable s3 features, use the disable_s3=False
flag.
Methods:
- S3:
- handle_s3_exception(err: Exception): Handle's common s3 errors.
- get_object_content(bucket_name: str, object_key: str): Get's a s3 object content as a string.
- download_wordlists(wordlist_keys: List[str]): Downloads a list of wordlists from s3 and combines them as one file.
- System:
- run_command(command: List[str]): Run a command (i.e. ["echo", "hello world"])
- Validation:
- validate_dict({"firstname": str, "age": int}): Validates that a dict matches required type entries
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
Close
Hashes for common-harness-lib-0.0.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94a3a7ff49bab0b0da9aecdd880ec1f3a5d701e313555d417c2c8a26a3d23287 |
|
MD5 | 34e60bf0e62b44f544914b21da6a1d7e |
|
BLAKE2b-256 | df31c5a17490a238cff87bf77f383a32cf9423c3ad4cc434e6e0792a23b71c02 |
Close
Hashes for common_harness_lib-0.0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | afc777330f343ae9a2c18d12fb61b97b87bcac294ae01cb856c9038b3d1d19b1 |
|
MD5 | 5a796e8f16530d44270dac6b4ad4b53a |
|
BLAKE2b-256 | 0a493caf0f83915e210afe0e437331b2c026fccc92953e6b7cebccd1df6ea06c |