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.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed40f193104a78e19a87b7f23c68838f212a13624d0b5125385730c3cc8e9e05 |
|
MD5 | a460cc288c86c258b79ee6e2fb038d62 |
|
BLAKE2b-256 | bbd295dd85d713f13d5b4c3d7bcaf4ad392754e4712200ff3eb4d698c89f2173 |
Close
Hashes for common_harness_lib-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f2c44fdc37bc0bcc5e501cd76e8c537fd4a1c4d5bf2e0e9b5aeb5a90183f80e |
|
MD5 | 068ece4cb33b1eacf3a1dfb9a97555fc |
|
BLAKE2b-256 | e931309c45627d32c343a4934489e58aa2a697aa8143b07b77da695e3d1d0739 |