Metadata-Version: 2.4
Name: jentic-apitools-pipelines
Version: 1.0.0a15
Summary: Jentic Apitools Pipelines - Orchestrate score, repair, and storage into workflow pipelines
Author: Jentic
Author-email: Jentic <hello@jentic.com>
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Requires-Dist: pydantic>=2.7,<3.0
Requires-Dist: jentic-apitools-common~=1.0.0a15
Requires-Dist: jentic-apitools-llm~=1.0.0a15
Requires-Dist: jentic-apitools-analyze~=1.0.0a15
Requires-Dist: jentic-apitools-score~=1.0.0a15
Requires-Dist: jentic-apitools-storage~=1.0.0a15
Requires-Dist: jentic-openapi-transformer>=1.0.0a55
Requires-Dist: jentic-openapi-transformer-redocly>=1.0.0a55
Requires-Dist: datadog>=0.52.1
Requires-Python: >=3.11
Project-URL: Homepage, https://github.com/jentic/jentic-apitools
Description-Content-Type: text/markdown

# Jentic API Tools - Pipelines

High-level workflows that orchestrate analyze, score, repair, and storage operations for OpenAPI specifications.

## Key Features

The pipelines package provides two main workflow functions: `import_openapi` runs the full import pipeline (fetch, parse, validate, convert, bundle, repair, score, store) and `score_openapi` runs a lighter scoring pipeline (fetch, parse, bundle, validate, score). Both functions accept an `OASJsonRequest` with processing configuration and an optional progress callback for real-time updates. By default, `import_openapi` rejects specs with invalid server URLs and invalid security definitions; these are controlled by `reject_invalid_server_urls` and `reject_invalid_security` in `OASProcessConfiguration`. The package handles format conversion from Swagger 2.0 and Google Discovery to OpenAPI 3.x, reference bundling via Redocly, and artifact management through configurable storage contexts. The `repo_tools` module provides `rebuild_scores_json` and `rebuild_apis_json` for rebuilding the root `scores.json` and `apis.json` catalog files from all API specs in a local repository clone.

## Dependencies

Internal: `common`, `llm`, `analyze`, `score`, `repair`, `storage`. External: jentic-openapi-transformer (with redocly), datadog.

## Installation

```bash
pip install jentic-apitools-pipelines
```

## Quick Start

```python
from jentic.apitools.common.models import OASJsonRequest, OASRequestMeta, OASProcessConfiguration
from jentic.apitools.pipelines import score_openapi

request = OASJsonRequest(meta=OASRequestMeta(oas_process_configuration=OASProcessConfiguration()))
result = score_openapi(request, spec_url="https://petstore3.swagger.io/api/v3/openapi.json")
print(f"Success: {result.success}")
```

## Testing

```bash
pytest tests -v
```
