Python bindings for accessing OSIDB API
Project description
osidb-bindings
A client library for accessing OSIDB API
Requirements
- gcc
- krb5-devel
- pip
- python3
- python3-devel
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.title
flaw.impact
# or the flaw can be converted into dict
flaw_dict = flaw.to_dict()
flaw_dict["title"]
flaw_dict["impact"]
# Retrieving multiple flaws
all_flaws = osidb_session.flaws.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.16.0.tar.gz
(197.8 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.16.0.tar.gz.
File metadata
- Download URL: osidb_bindings-4.16.0.tar.gz
- Upload date:
- Size: 197.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab69ece4dabdfefb0010b44263e09813499026d17fe357e2847ea8fb106186e9
|
|
| MD5 |
58643e02f16433c0afe728b9d26db822
|
|
| BLAKE2b-256 |
903abffeaa234ef0453e4c28718751a8bfd6942248d5ea590fd9792e3b708b34
|
File details
Details for the file osidb_bindings-4.16.0-py3-none-any.whl.
File metadata
- Download URL: osidb_bindings-4.16.0-py3-none-any.whl
- Upload date:
- Size: 576.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa0ed1ac3e1aea144f814b7a65a66b1ddb58cb1c7dc711b6eaedf4d132583b55
|
|
| MD5 |
9b1816b084780887c29a8fcd09e6aba1
|
|
| BLAKE2b-256 |
b6a80a96106fe2e91debf9009b64006767bfd33853eb7d827cf81f89aad08a7d
|