Metadata-Version: 2.1
Name: ossindex_api_client
Version: 2024.323.0
Summary: Sonatype OSS Index
Home-page: https://github.com/sonatype-nexus-community/ossindex-api-client
License: Apache 2.0
Keywords: OpenAPI,OpenAPI-Generator,Sonatype OSS Index
Author: Sonatype Community Maintainers
Author-email: community@sonatype.com
Requires-Python: >=3.8,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: pydantic (>=2)
Requires-Dist: python-dateutil (>=2.8.2)
Requires-Dist: typing-extensions (>=4.7.1)
Requires-Dist: urllib3 (>=1.25.3,<3.0.0)
Project-URL: Repository, https://github.com/sonatype-nexus-community/ossindex-api-client
Description-Content-Type: text/markdown

# ossindex-api-client
This documents the available APIs into [Sonatype OSS Index](https://ossindex.sonatype.org/) - API Version: 1-SNAPSHOT (be72c8343baab38a8c598d28dafc78003dce81db).

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 2024.323
- Package version: 1.0.0
- Generator version: 7.9.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://github.com/sonatype-nexus-community](https://github.com/sonatype-nexus-community)

## Requirements.

Python 3.7+

## Installation & Usage
### pip install

If the python package is hosted on a repository, you can install directly using:

```sh
pip install git+https://github.com/sonatype-nexus-community/ossindex-api-client.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/sonatype-nexus-community/ossindex-api-client.git`)

Then import the package:
```python
import ossindex_api_client
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import ossindex_api_client
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import ossindex_api_client
from ossindex_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://ossindex.sonatype.org
# See configuration.py for a list of all supported configuration parameters.
configuration = ossindex_api_client.Configuration(
    host = "https://ossindex.sonatype.org"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: apiToken
configuration = ossindex_api_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure HTTP basic authorization: basicAuth
configuration = ossindex_api_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)


# Enter a context with an instance of the API client
with ossindex_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ossindex_api_client.ComponentVulnerabilityReportsApi(api_client)
    body = ossindex_api_client.ComponentReportRequest() # ComponentReportRequest |  (optional)

    try:
        # Request vulnerability reports for components
        api_response = api_instance.post(body=body)
        print("The response of ComponentVulnerabilityReportsApi->post:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ComponentVulnerabilityReportsApi->post: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *https://ossindex.sonatype.org*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ComponentVulnerabilityReportsApi* | [**post**](docs/ComponentVulnerabilityReportsApi.md#post) | **POST** /api/v3/component-report | Request vulnerability reports for components
*ComponentVulnerabilityReportsApi* | [**post1**](docs/ComponentVulnerabilityReportsApi.md#post1) | **POST** /api/v3/authorized/component-report | Request vulnerability reports for components
*VersionApi* | [**get**](docs/VersionApi.md#get) | **GET** /api/v3/version | Get service version information


## Documentation For Models

 - [ComponentReport](docs/ComponentReport.md)
 - [ComponentReportRequest](docs/ComponentReportRequest.md)
 - [ComponentReportVulnerability](docs/ComponentReportVulnerability.md)
 - [Version](docs/Version.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


Authentication schemes defined for the API:
<a id="apiToken"></a>
### apiToken

- **Type**: HTTP basic authentication

<a id="basicAuth"></a>
### basicAuth

- **Type**: HTTP basic authentication


## Author

community@sonatype.com



