OSIDB Bindings
A Pythonic way to talk to OSIDB without getting lost in HTTP details.
Requirements
- gcc
- krb5-devel
- pip
- python3
- python3-devel
Installation
Install the bindings using pip (recommended within a virtual environment):
pip install osidb-bindings
Quick Start
Basic Authentication
import osidb_bindings
# For local OSIDB instances with username/password authentication
session = osidb_bindings.new_session(
osidb_server_uri="http://localhost:8000/",
username="your_username",
password="your_password"
)
Kerberos Authentication
# For production/staging instances with Kerberos authentication (default)
session = osidb_bindings.new_session(osidb_server_uri="https://your-osidb-instance.com/")
Basic Operations
# Check connection status
status = session.status()
# Retrieve a specific flaw
flaw = session.flaws.retrieve(id="CVE-1111-2222")
# Access flaw attributes
print(flaw.title)
print(flaw.impact)
# Convert to dictionary for easier manipulation
flaw_dict = flaw.to_dict()
print(flaw_dict["title"])
print(flaw_dict["impact"])
# Retrieve multiple flaws with filtering
critical_flaws = session.flaws.retrieve_list(impact="CRITICAL")
recent_flaws = session.flaws.retrieve_list(changed_after="2023-01-01")
# Access paginated results
print(f"Total flaws found: {critical_flaws.count}")
for flaw in critical_flaws.results:
print(f"CVE: {flaw.cve_id}, Impact: {flaw.impact}")
API Version Control
# Use latest API version (default behavior)
flaw = session.flaws.retrieve(id="CVE-1111-2222")
# Specify a particular API version for stability
flaw = session.flaws.retrieve(id="CVE-1111-2222", api_version="v1")
# Discover available API versions
print(session.endpoints)
Documentation
- Complete Tutorial - Comprehensive guide with examples
- Developer Guide - Development and contribution guidelines
Features
- Automatic Authentication - Handles JWT token refresh automatically
- Multiple API Versions - Support for v1, v2, and future API versions
- Intuitive Interface - Pythonic API that mirrors OSIDB REST endpoints
- Comprehensive Coverage - Access to flaws, affects, trackers, and more
- Pagination Support - Built-in handling of paginated responses
- Error Handling - Clear exceptions for better debugging
Metadata
Release files for osidb-bindings 5.19.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| osidb_bindings-5.19.0.tar.gz | 394.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| osidb_bindings-5.19.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.4 MB
Release files / osidb_bindings-5.19.0.tar.gz
| Download URL | osidb_bindings-5.19.0.tar.gz |
|---|---|
| Size | 394.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13a11a3a96698d2b6cef7784f3031df90030e41a75294628dbbcf1fe4aaa1cb3
|
|
BLAKE2b-256 checksum How to use checksums |
927c3a988aed0adf1bd1a43d165276f5ff69b739897128f8782b634861ce7f2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / osidb_bindings-5.19.0-py3-none-any.whl
| Download URL | osidb_bindings-5.19.0-py3-none-any.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eb51802bf164226acd7b9208d335bb11b72c7709710cfcf5c93c6d9a0f83299a
|
|
BLAKE2b-256 checksum How to use checksums |
e5c7e8164287cb42a9fe971c643298433325606e9d043a03ad64ec67a24ef401
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|