Skip to main content

Code for processing report from Thoth components.

Project description

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
)[0]

si_cloc_report = SecurityIndicatorsCloc.aggregate_security_indicator_cloc_results(
   security_indicator_cloc_repo_path=_SI_CLOC_FOLDER_PATH
)[0]

aggregated_json = security_aggregator.create_si_aggregated_json(
   si_bandit_report=si_bandit_report, si_cloc_report=si_cloc_report
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thoth-report-processing-0.2.3.tar.gz (76.9 kB view details)

Uploaded Source

Built Distribution

thoth_report_processing-0.2.3-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file thoth-report-processing-0.2.3.tar.gz.

File metadata

  • Download URL: thoth-report-processing-0.2.3.tar.gz
  • Upload date:
  • Size: 76.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8

File hashes

Hashes for thoth-report-processing-0.2.3.tar.gz
Algorithm Hash digest
SHA256 cff63200fe74c8c3cfde24d6c33f8205cd298709a5f78c2e2f7be93f8acc9cbd
MD5 e64547f9294cfc45f2599a2ea4c82486
BLAKE2b-256 f53c44c14beb06246a6aef5fbe55c236841bd0ccab8fcc56e03a006aff246eca

See more details on using hashes here.

File details

Details for the file thoth_report_processing-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: thoth_report_processing-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8

File hashes

Hashes for thoth_report_processing-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9555c34db0857e3faab4d95be20afc3f358e2c6eb41b9cf1a7482a6ac82d9b57
MD5 d136afeefba312ca90889b0733e3a9a3
BLAKE2b-256 f362da0e34b61f13d4d9760426e3f69ed57c457617dd6ec1a60edadf198c152b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page