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.10.0.tar.gz
(185.4 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.10.0.tar.gz.
File metadata
- Download URL: osidb_bindings-4.10.0.tar.gz
- Upload date:
- Size: 185.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e49b0e1b28fb8dd7c9c691473b45ddc4487c50ca85f9ba0237f241e9e31eb2d
|
|
| MD5 |
0cc4d77efb182a0db98f3227874c7528
|
|
| BLAKE2b-256 |
c5256d25aa9ff8edc19edf4a5845743b8adbf7013b292ad8fe8b339ec2a9bb1f
|
File details
Details for the file osidb_bindings-4.10.0-py3-none-any.whl.
File metadata
- Download URL: osidb_bindings-4.10.0-py3-none-any.whl
- Upload date:
- Size: 507.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5f67d68f5db63f3682279610bc2bd9e31c60b3db184f463976dae03361e935b
|
|
| MD5 |
2ec980a74acb6e49dd9e67d54aa18c74
|
|
| BLAKE2b-256 |
34cb94508389f891e63ca09b0aef85e99a9a7b82de9bda7ca803547b87bea0ef
|