Skip to main content

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

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.20.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for osidb-bindings 5.20.0
File Size Uploaded Provenance Actions
osidb_bindings-5.20.0.tar.gz 396.3 kB Without provenance Details for osidb_bindings-5.20.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for osidb-bindings 5.20.0
File Interpreter ABI Platform Actions
osidb_bindings-5.20.0-py3-none-any.whl Python 3 none any Details for osidb_bindings-5.20.0-py3-none-any.whl

Total release size: 1.4 MB

Release files / osidb_bindings-5.20.0.tar.gz

Download URL osidb_bindings-5.20.0.tar.gz
Size 396.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ea6cc95966384fd92866bb09f0f7034f2cc4582c03b0a9138db18346653c641b
BLAKE2b-256 checksum
How to use checksums
246ba82dbb20da070f24bce95692b7381d52b51b7010cb66821181ece04eff1f
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.20.0-py3-none-any.whl

Download URL osidb_bindings-5.20.0-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
540036900f553351ca9109336d6d7ef4797bae2fd41bc3d6b3f400a00f18418b
BLAKE2b-256 checksum
How to use checksums
d814ec58649ad134a27b494b051e15811012ab31018f0dfecd7254af99cecd4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for osidb-bindings 5.20.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

5.20.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page