Metadata-Version: 2.1
Name: osv-utils
Version: 0.3.3
Summary: A package for parsing, representing, and filtering OSV data.
Author-email: Eduard Pinconschi <eduard.pinconschi@tecnico.ulisboa.pt>
Project-URL: repository, https://github.com/epicosy/osvutils
Project-URL: homepage, https://github.com/epicosy/osvutils
Keywords: package,osv,utils
Classifier: Topic :: Software Development
Classifier: Programming Language :: Python
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: tqdm~=4.66.4
Requires-Dist: pydantic~=2.9.2
Requires-Dist: google-cloud-storage~=2.18.2
Requires-Dist: giturlparse~=0.12.0
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: coverage; extra == "test"
Requires-Dist: twine>=1.11.0; extra == "test"
Requires-Dist: setuptools>=38.6.0; extra == "test"
Requires-Dist: wheel>=0.31.0; extra == "test"

# 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:

```sh
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:

```python
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:
    
```python
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.
