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.7.1.tar.gz
(180.0 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.7.1.tar.gz.
File metadata
- Download URL: osidb_bindings-4.7.1.tar.gz
- Upload date:
- Size: 180.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d92606f6c3fe5d77ec12a475327212904baa99058efa953eae0d3eb0a2124dd9
|
|
| MD5 |
7dd4d743a23a226eb7d721fa85eb82ec
|
|
| BLAKE2b-256 |
36e03b4685d3ce86b2a26443cb94690f520889fd8cd96c005967a2fcf101bf1e
|
File details
Details for the file osidb_bindings-4.7.1-py3-none-any.whl.
File metadata
- Download URL: osidb_bindings-4.7.1-py3-none-any.whl
- Upload date:
- Size: 491.3 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 |
c019a4f9b8837959df7be773485c6ed04427eaee503f9979fc49c5b7f2bcf443
|
|
| MD5 |
2b0a37d179e387fc86ab4e9b0d14d357
|
|
| BLAKE2b-256 |
c2c80705e133a2ac3ec7cb6e1b60b01f5602e324de1cb9b430a23ece072ea635
|