Python bindings for accessing OSIDB API
Project description
osidb-bindings
A client library for accessing OSIDB API
Installation
pip install osidb_bindings
Usage
import osidb_bindings
# Basic auth
osidb_session = osidb_bindings.new_session(osidb_server_uri="http://localhost:8000/", username="username", password="password")
or
# Default kerberos auth
osidb_session = osidb_bindings.new_session(osidb_server_uri="http://localhost:8000/")
# Get status
osidb_session.status()
# Retrieve flaw
flaw = osidb_session.flaws.retrieve(id="CVE-1111-2222")
# Fields can be accessed directly via attributes
flaw.summary
flaw.impact
# or the flaw can be converted into dict
flaw_dict = flaw.to_dict()
flaw_dict["summary"]
flaw_dict["impact"]
# Retrieving multiple flaws
all_flaws = osidb_session.flaw.retrieve_list()
# All query params listed in OpenAPI schema can be passed as well
filtered_flaws = osidb_session.flaws.retrieve_list(impact="IMPORTANT", tracker_ids=["111111", "222222"])
# number of results
filtered_flaws.count
# list with the results
filtered_flaws.results
For more details read tutorial
For development details read developer guide
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
osidb_bindings-4.8.2.tar.gz
(185.3 kB
view details)
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 osidb_bindings-4.8.2.tar.gz.
File metadata
- Download URL: osidb_bindings-4.8.2.tar.gz
- Upload date:
- Size: 185.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57a14983734d2746db1f835e9efb290a908bb66f1be890a12aeab9db09466225
|
|
| MD5 |
0c1988c7e9d731463f6d51a801a9ae9e
|
|
| BLAKE2b-256 |
e2c21b7432c99b8b8655f33afbebceb014fd4b0b0029f5a0f4a829209e73677b
|
File details
Details for the file osidb_bindings-4.8.2-py3-none-any.whl.
File metadata
- Download URL: osidb_bindings-4.8.2-py3-none-any.whl
- Upload date:
- Size: 507.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6703133179f5bf7924316af1d5e5cb3314afe63a76cce7b53b1ab66e3ea327a2
|
|
| MD5 |
d8f132b78abb62b61edfbbbe151a14ea
|
|
| BLAKE2b-256 |
1bd454b0d0bf7a997074014afa28cbdd51cde77e048ad5d2b891a4d71f2c43c1
|