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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

osv_utils-0.3.10-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: osv_utils-0.3.10.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for osv_utils-0.3.10.tar.gz
Algorithm Hash digest
SHA256 4ff23ab50878e64fbb4d2a2bc613320cd0cbbbee6482e09873debcf424b428a7
MD5 20983af2f3e2713e0701a0fefb622203
BLAKE2b-256 2ea0ee4314e505b8bcb6ffcc123779957758c6b3eed94803a2a4739c0f1a9c60

See more details on using hashes here.

File details

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

File metadata

  • Download URL: osv_utils-0.3.10-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for osv_utils-0.3.10-py3-none-any.whl
Algorithm Hash digest
SHA256 13517381910b833886641b12251f452cd84ffb70f2729fa3f99b9aec998225b8
MD5 c3f1185bf16ee64ab437ca8289e1216a
BLAKE2b-256 f98d393900ca3bd5da63a55ceefebafd66ed95b45c40b666b85d9fa553cf6f6a

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