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.11.0.tar.gz
(191.6 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.11.0.tar.gz.
File metadata
- Download URL: osidb_bindings-4.11.0.tar.gz
- Upload date:
- Size: 191.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
027739234d57f1475d1b72fbfde0850b7106fc3bd32e61230bd9b12ca3572426
|
|
| MD5 |
ada9610dd0d60b2c194245011c4fa9bf
|
|
| BLAKE2b-256 |
3cfd85168bfed5d52cbfc98b82bc2a4d41cb39e5d70674c0a4edc7e4592cb36a
|
File details
Details for the file osidb_bindings-4.11.0-py3-none-any.whl.
File metadata
- Download URL: osidb_bindings-4.11.0-py3-none-any.whl
- Upload date:
- Size: 534.5 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 |
5586cd20872223f148264a2d169d4fd10c8aa832e8d3bb960093b4e9e70ca36d
|
|
| MD5 |
88da07597c53d50dccc8de169bbf81f1
|
|
| BLAKE2b-256 |
35dceafc9f416f8b6d1a8d1b735a5c92ca55703343179e01ac0df4401eab1110
|