Skip to main content

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


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.6.2.tar.gz (173.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

osidb_bindings-4.6.2-py3-none-any.whl (462.6 kB view details)

Uploaded Python 3

File details

Details for the file osidb_bindings-4.6.2.tar.gz.

File metadata

  • Download URL: osidb_bindings-4.6.2.tar.gz
  • Upload date:
  • Size: 173.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for osidb_bindings-4.6.2.tar.gz
Algorithm Hash digest
SHA256 be67307cafa21f2fe40e98b236b37ab49d49ef2f34c19aa269d4048b0a6d1419
MD5 904f84be79bb39de5680e82460485260
BLAKE2b-256 04789b0e29323034484330bf51ecec3d4a4f1d6dc9025cf28fd1ce573ea75bd6

See more details on using hashes here.

File details

Details for the file osidb_bindings-4.6.2-py3-none-any.whl.

File metadata

  • Download URL: osidb_bindings-4.6.2-py3-none-any.whl
  • Upload date:
  • Size: 462.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for osidb_bindings-4.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 561f8404f997c0627e09bd662fc6ef9219f90b2aa420527d6f917ea9e5deeedc
MD5 2c571792450fee6e6bc97cd1dc1e4f0d
BLAKE2b-256 0a784857997d0fa56a6af858a1c08f29becfb579a0ec5791b07dc65c6adebe72

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page