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

Uploaded Source

Built Distribution

osidb_bindings-4.5.0-py3-none-any.whl (402.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for osidb_bindings-4.5.0.tar.gz
Algorithm Hash digest
SHA256 80f5fbe1c11d54b40fd4969d8bb2fd49f29a638fdd86dcdfc40fd6b526733367
MD5 727655c071c2a8508fe0863fdfed5f48
BLAKE2b-256 2574f1645d89a32ea28fbf8b8e1dc6373d7211f0fb7027b35dc0529c7f26b47e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for osidb_bindings-4.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11b655f47a6aece3c8e26583ec0a369fa03a7e08a739b49a2c40496316f67a84
MD5 d692be0e5424906299b6db0bd09a128b
BLAKE2b-256 88169852b43daaabfde4239d13343b001108c982f3810ce4c4af768b07721e1c

See more details on using hashes here.

Supported by

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