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")

# Attributes can be accessed directly via .
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.0.tar.gz (142.2 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.0-py3-none-any.whl (402.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for osidb_bindings-4.6.0.tar.gz
Algorithm Hash digest
SHA256 5572dbcb6d3e01d8298d680f6b3a71cc310a4e49cf1bddd0f95a5053cf5438bd
MD5 2a21d78c16bf3114fa64f1bc35ec0f5e
BLAKE2b-256 62a6e4c25002743c7bc672d9ce84612007533f896b12976ff1123cbf0a64f651

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for osidb_bindings-4.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8248c43a1ca23c78cd86611c6327d75a39e1a23bc762c87600e0000cc122cea7
MD5 aa0534054d187d4aecb5e0ea5d61ee86
BLAKE2b-256 c9dd3cb4f76d666a4edbe1a732922b4cfafd7cf7882d2aae7438af2e0a782e49

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