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.16.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 815f6963341c6356a4c36183aa61f9768636a3e62ad71ae01afc452c6474d70f |
|
MD5 | 8d2e3e145c2a25e5e5bbd133c41db47c |
|
BLAKE2b-256 | d12f340ad002352c7099e665aa3ec0420f67e00b3f39e513a2dfec3c386dee40 |
Close
Hashes for common_harness_lib-0.0.16-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1860b63c4c8af59ac16ef1d5c4da09f7d9fdbc5aef37cdb615808b8e2921c4b0 |
|
MD5 | bde5a387de4db678ce687b25690563d2 |
|
BLAKE2b-256 | 1b03959f9cd95889e8e57713db7a809bdbcbb5a1d6e49c7745c39be8f014b9b6 |