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.23.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.23.0
File Size Uploaded Provenance Actions
osidb_bindings-5.23.0.tar.gz 401.4 kB Without provenance Details for osidb_bindings-5.23.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.4 MB

Release files / osidb_bindings-5.23.0.tar.gz

Download URL osidb_bindings-5.23.0.tar.gz
Size 401.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2363124de9f881ccf101e293c81643e37602d3ac0d90085bd1b6b3db637538cb
BLAKE2b-256 checksum
How to use checksums
6fddac824fb9846dbfecef5eb3fa8fc3f05de7af52f46ea7005ca43314b63d88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / osidb_bindings-5.23.0-py3-none-any.whl

Download URL osidb_bindings-5.23.0-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a9e95b0fdf8e415fa643011233170bcf4b64d664826d08528f00cc544d3cef81
BLAKE2b-256 checksum
How to use checksums
225ad9dcb636c4277ee6f6b1329edae0246e456c5656dddae9fe85c1a5e611ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for osidb-bindings 5.23.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.23.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