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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file osv_utils-0.3.7.tar.gz
.
File metadata
- Download URL: osv_utils-0.3.7.tar.gz
- Upload date:
- Size: 13.8 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79fc2d9917932ccbd0d803a3b9cc509c38216c2b4a1cc261be88c5df4be44621 |
|
MD5 | 580deace2b52baee42f218e7ea5551a1 |
|
BLAKE2b-256 | ad2c420ea10e717bf7b6a99005b04ec9c9a8be60b32c9017956a74bffc2caa6a |
File details
Details for the file osv_utils-0.3.7-py3-none-any.whl
.
File metadata
- Download URL: osv_utils-0.3.7-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2273de9ac9cf3a2cc154d0a57dad96fb6dfaa8a49bdba0570d66a6f07b67d2ca |
|
MD5 | dbb1ba75419ebfdf9f401d2ef0995502 |
|
BLAKE2b-256 | 2810876195e1ed22fc300f9fa5be77ef3e09ea6474832d263799dda740c7f06e |