Create a local cache of openQA job log files
Project description
openQA log local
Library and cli to locally collect and inspect logs from openQA
File will be locally cached on disk, downloaded and read transparently.
Dependency
This package internally depend on openQA-python-client: please refer to documentation about openQA autentication.
Installation
pip install openqa_log_local
To install the package from the source code you can use uv:
uv pip install -e .
Usage
Library
To use the library in your Python project, you first need to import the openQA_log_local class:
from openqa_log_local import openQA_log_local
Then, you can create an instance of the class, providing the openQA host URL:
oll = openQA_log_local(host='http://openqa.opensuse.org')
# Get job details
log_details = oll.get_details(job_id=1234)
# Get a list of log files associated to an openQA job.
# No download any log file yet.
log_list = oll.get_log_list(job_id=1234)
log_txt_list = oll.get_log_list(job_id=4567, name_pattern=[r'*\.txt'])
# Get content of a single log file. The file is downloaded to the cache
# if not already available locally.
# All the log file content is returned in `log_data`
log_data = oll.get_log_data(job_id=1234, filename=log_list[3])
# Get absolute path with filename of a single log file from the cache.
# The file is downloaded to the cache if not already available locally.
log_filename = oll.get_log_filename(job_id=1234, filename=log_list[3])
Cache can be configured:
oll = openQA_log_local(
host='http://openqa.opensuse.org',
cache_location='/home/user/.openqa_cache',
max_size=100000,
time_to_live=3600)
Or also forced to be ignored and refreshed
oll = openQA_log_local(
host='http://openqa.opensuse.org',
user_ignore_cache)
CLI
The package also provides a command-line interface (CLI) for interacting with openQA logs.
Get Job Details
openqa-log-local get-details --host http://openqa.opensuse.org --job-id 1234
Run via uv if you have used uv to install it
uv run openqa-log-local get-details --host http://openqa.opensuse.org --job-id 1234
Get Log List
openqa-log-local get-log-list --host http://openqa.opensuse.org --job-id 1234
Get Log Data
openqa-log-local get-log-data --host http://openqa.opensuse.org --job-id 1234 --filename autoinst-log.txt
Get Log Filename
openqa-log-local get-log-filename --host http://openqa.opensuse.org --job-id 1234 --filename autoinst-log.txt
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openqa_log_local-0.0.1.tar.gz.
File metadata
- Download URL: openqa_log_local-0.0.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c7c5af3ce938215f689d7a18967fb0ee31f4e86d17367c241d6943e6140dd18
|
|
| MD5 |
4bb03639ccc40e35edb35040fbf28943
|
|
| BLAKE2b-256 |
81d7f52ccf1743b867bbd187b2349157fd66e57d7bc80c21e9355ee89733039f
|
Provenance
The following attestation bundles were made for openqa_log_local-0.0.1.tar.gz:
Publisher:
publish.yml on mpagot/openqa_log_local
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openqa_log_local-0.0.1.tar.gz -
Subject digest:
6c7c5af3ce938215f689d7a18967fb0ee31f4e86d17367c241d6943e6140dd18 - Sigstore transparency entry: 741202898
- Sigstore integration time:
-
Permalink:
mpagot/openqa_log_local@efa054f781f80080077a08edbbdaf8dac6db0ac2 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/mpagot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@efa054f781f80080077a08edbbdaf8dac6db0ac2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file openqa_log_local-0.0.1-py3-none-any.whl.
File metadata
- Download URL: openqa_log_local-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29c9ac24790e2155d4e6b8833329b16939b0ff4d64e3b55943b105387a185540
|
|
| MD5 |
a10b505245cb4dfa666aa7ee6537560a
|
|
| BLAKE2b-256 |
4efb389fe4778cfdb5729e9874ff3239939c8b4f31493a5515fc1bed5c164c0d
|
Provenance
The following attestation bundles were made for openqa_log_local-0.0.1-py3-none-any.whl:
Publisher:
publish.yml on mpagot/openqa_log_local
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openqa_log_local-0.0.1-py3-none-any.whl -
Subject digest:
29c9ac24790e2155d4e6b8833329b16939b0ff4d64e3b55943b105387a185540 - Sigstore transparency entry: 741202923
- Sigstore integration time:
-
Permalink:
mpagot/openqa_log_local@efa054f781f80080077a08edbbdaf8dac6db0ac2 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/mpagot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@efa054f781f80080077a08edbbdaf8dac6db0ac2 -
Trigger Event:
push
-
Statement type: