Skip to main content

A package for parsing, representing, and filtering OSV data.

Project description

osv-utils

osv-utils is a Python package designed for collecting and loading OSV (Open Source Vulnerability) records from various ecosystems. It provides an easy-to-use interface to interact with OSV data.

Installation

To install the osv-utils package, you can use pip:

pip install osv-utils

Setup

Before using osv-utils, you may want to configure the data path where OSV records will be stored. By default, the data will be saved in the ~/.osvutils/gs directory.

You can customize the data_path by providing it during the initialization of OSVDataCollector or OSVDataLoader.

Usage

Collecting OSV Records

To collect OSV records from specific ecosystems, use the OSVDataCollector class. Below is an example of how to collect records from the GIT ecosystem:

from osvutils.core.collector import OSVDataCollector

collector = OSVDataCollector(verbose=True)
count = collector(['GIT'])

print(f"Total records collected: {count}")

Loading OSV Records

To load the collected OSV records, use the OSVDataLoader class. Below is an example of how to load records from the GIT ecosystem:

from osvutils.core.loader import OSVDataLoader

loader = OSVDataLoader(verbose=True)
loader(['GIT'])
print(len(loader))

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any improvements, bug fixes, or feature requests.

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

osv_utils-0.3.2.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

osv_utils-0.3.2-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file osv_utils-0.3.2.tar.gz.

File metadata

  • Download URL: osv_utils-0.3.2.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.63.0 CPython/3.8.10

File hashes

Hashes for osv_utils-0.3.2.tar.gz
Algorithm Hash digest
SHA256 e74f0d338116c20044afc3f05d4326dd269348912847ac5e2d1c11fcf694da96
MD5 db8a63a18adc4cc2a435816805c5805a
BLAKE2b-256 8c285de00fdc3186a11029c0a3f2a845313cae6642e66073a13e6c8bd46c1ff7

See more details on using hashes here.

File details

Details for the file osv_utils-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: osv_utils-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.63.0 CPython/3.8.10

File hashes

Hashes for osv_utils-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1d32cd6a0dd66ba3d870ec94dd7385530da5609ca116b846d02766ee1e842374
MD5 81328f995830987bc82448472b7a6b86
BLAKE2b-256 9e79b33345c619c115b2c6147e746a0f56fdfa9af33f6ebd21e08c6e5653acfc

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