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, 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
)

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.7.0.tar.gz (86.0 kB view details)

Uploaded Source

Built Distribution

thoth_report_processing-0.7.0-py3-none-any.whl (45.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: thoth-report-processing-0.7.0.tar.gz
  • Upload date:
  • Size: 86.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.7

File hashes

Hashes for thoth-report-processing-0.7.0.tar.gz
Algorithm Hash digest
SHA256 68486567a62eb2f60b82ac0b819dabb7013bba62911fdfe34fc4d76fb1f96206
MD5 c7f066789fb626ce96af1090459ad630
BLAKE2b-256 0d068510931cff1140c8653ca71d294a1330fb62a5dd171b3a6f1af5f71578d1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: thoth_report_processing-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 45.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.7

File hashes

Hashes for thoth_report_processing-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c0419d75299bd316869d5386023bcf0e5be19c57ccd1d63d46e6abfce36f65e
MD5 67472f9331cf7e10e7283e4d81e618f0
BLAKE2b-256 2ad1ac56a9699be8a7f9238427dd4949af8014d0b1d62a149be8aa611319725d

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