Skip to main content

Python bindings for accessing OSIDB API

Project description

osidb-bindings

A client library for accessing OSIDB API

Requirements

  • gcc
  • krb5-devel
  • pip
  • python3
  • python3-devel

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.title
flaw.impact

# or the flaw can be converted into dict
flaw_dict = flaw.to_dict()
flaw_dict["title"]
flaw_dict["impact"]

# Retrieving multiple flaws
all_flaws = osidb_session.flaws.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.13.0.tar.gz (201.0 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.13.0-py3-none-any.whl (577.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for osidb_bindings-4.13.0.tar.gz
Algorithm Hash digest
SHA256 6e074fce4c9cf6d89ab9079bb568e37eb48cdb0e1b78f2970fadbee0343fb40e
MD5 8d4b2abf6a96426e75b6fe6fbbad09bd
BLAKE2b-256 adb89f774ec4af89dd5ef6494824af1befdcd856d6c182f991657625de2cf01b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for osidb_bindings-4.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e4af1197e7b7629277b686e751e1e150679a218043dec19a93641da2be0d80b2
MD5 c8871899ebf41bd52f9ba1e6e9394c72
BLAKE2b-256 c5876b5e92401ca9615c1db04cbb5bee943789c29e8398f00fb255d7dbb3d019

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