Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.43

* **Deprecate `wrap_in_fastapi`** - Mark `wrap_in_fastapi` (and the `etl-uvicorn` CLI it backs) as deprecated via PEP 702 `@deprecated`. New plugins should build a FastAPI app directly with explicit handlers for the plugin contract routes.

## 0.0.42

* **Support "none" value for OTEL_TRACES_EXPORTER and OTEL_METRICS_EXPORTER** - Filter "none" from exporter lists and return None when no exporters configured to properly disable OpenTelemetry instrumentation
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Unstructured Platform Plugins
![CI](https://github.com/Unstructured-IO/unstructured-platform-plugins/actions/workflows/ci.yml/badge.svg?branch=main)

> **Deprecation notice:** `wrap_in_fastapi` (and the `etl-uvicorn` CLI it backs)
> is deprecated. New plugins should build a FastAPI app directly with explicit
> handlers for the plugin contract routes (`/invoke`, `/schema`, `/id`, etc.).

Information about how to build custom plugins to integrate with Unstructured Platform.

## Plugin Development
Expand Down
2 changes: 1 addition & 1 deletion unstructured_platform_plugins/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.42" # pragma: no cover
__version__ = "0.0.43" # pragma: no cover
5 changes: 5 additions & 0 deletions unstructured_platform_plugins/etl_uvicorn/api_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor
from pydantic import BaseModel, Field, create_model
from starlette.responses import RedirectResponse
from typing_extensions import deprecated
from unstructured_ingest.data_types.file_data import BatchFileData, FileData, file_data_from_dict
from unstructured_ingest.error import UnstructuredIngestError
from uvicorn.config import LOG_LEVELS
Expand Down Expand Up @@ -108,6 +109,10 @@ def update_filedata_model(new_type) -> BaseModel:
return new_filedata_model


@deprecated(
"wrap_in_fastapi is deprecated; build a FastAPI app directly with "
"explicit handlers for the plugin contract routes."
)
def wrap_in_fastapi(
func: Callable,
plugin_id: str,
Expand Down
Loading