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.10.1.tar.gz (185.5 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.10.1-py3-none-any.whl (507.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: osidb_bindings-4.10.1.tar.gz
  • Upload date:
  • Size: 185.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for osidb_bindings-4.10.1.tar.gz
Algorithm Hash digest
SHA256 e4ff374d3ea4edaad05776b6da74b4cf67a276adbe1cd3bd75e17b9af772a73c
MD5 a4108414e3235d378b8d7a10d72e39b8
BLAKE2b-256 ffa90fbf591ae9393e49d943b2e06d1abf8ac876931ce1c1410f494b99011919

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for osidb_bindings-4.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 05d4c5012f21735f9f7674d672ebff3e3e09ed5296e0a1d1525153c68d2423d4
MD5 9348fc802ecac0206fa1cc352ebaa9ea
BLAKE2b-256 218389c26f70e82a4567adbd5f8783b3d69a8bad9323ca32daabb17ef9a9188a

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