Metadata-Version: 2.1
Name: osv-utils
Version: 0.3.9
Summary: A package for parsing, representing, and filtering OSV data.
Author-email: Eduard Pinconschi <eduard.pinconschi@tecnico.ulisboa.pt>
License: MIT License
        
        Copyright (c) 2024 Eduard Pinconschi
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
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
Requires-Dist: cvss ==3.2
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.
