This library called thoth-report-processing is used in project Thoth to process all outputs provided by Thoth Components and stored using thoth-storages library.
Installation and Usage
The library can be installed via pip or Pipenv from PyPI:
pipenv install thoth-report-processing
The library does not provide any CLI, it is rather a low level library supporting other parts of Thoth.
Reports Processing
The reports to be processed can be retrieved in two ways:
locally, providing a path.
Using Ceph S3 providing the following environment variables:
THOTH_CEPH_KEY_ID=<ceph_key_id> THOTH_CEPH_SECRET_KEY=<ceph_key_id> THOTH_S3_ENDPOINT_URL=<s3_endpoint_url> THOTH_CEPH_HOST=<ceph_host> THOTH_CEPH_BUCKET=<ceph_bucket> THOTH_CEPH_BUCKET_PREFIX=<ceph_bucket_prefix> THOTH_DEPLOYMENT_NAMR=<deployment_name>
see currently available adapters from thoth-storages here.
Security Indicators
Aggregating Security Indicators using local path:
from thoth.report_processing.components.security import SecurityIndicatorsBandit, SecurityIndicatorsCloc
from thoth.report_processing.components.security import SecurityIndicatorsAggregator
_SI_BANDIT_FOLDER_PATH =<>
_SI_CLOC_FOLDER_PATH =<>
security_aggregator = SecurityIndicatorsAggregator()
si_bandit_report = SecurityIndicatorsBandit.aggregate_security_indicator_bandit_results(
security_indicator_bandit_repo_path=_SI_BANDIT_FOLDER_PATH, is_local=True
)[0]
si_cloc_report = SecurityIndicatorsCloc.aggregate_security_indicator_cloc_results(
security_indicator_cloc_repo_path=_SI_CLOC_FOLDER_PATH, is_local=True
)[0]
aggregated_json = security_aggregator.create_si_aggregated_json(
si_bandit_report=si_bandit_report, si_cloc_report=si_cloc_report
)
Release files for thoth-report-processing 0.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| thoth-report-processing-0.8.1.tar.gz | 103.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| thoth_report_processing-0.8.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 149.3 kB
Release files / thoth-report-processing-0.8.1.tar.gz
| Download URL | thoth-report-processing-0.8.1.tar.gz |
|---|---|
| Size | 103.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74d605aba5d4b8cc9f91ebcd96cac124580f52cb977db58d1ebddb1b1fe587d0
|
|
BLAKE2b-256 checksum How to use checksums |
971ea7a67e977307fd561782477828cb30cc81daa794548d226b5344223c7368
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.8
|
Release files / thoth_report_processing-0.8.1-py3-none-any.whl
| Download URL | thoth_report_processing-0.8.1-py3-none-any.whl |
|---|---|
| Size | 45.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
723d6463c16af0672b5b69dc3e9bea0eb98d140603b18bd860dc60b38ac20011
|
|
BLAKE2b-256 checksum How to use checksums |
4a3aabbae4d2e1fb37d626f71c75aafc4fd42367488ff023f623d6428918ef4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.8
|