Metadata-Version: 2.4
Name: victorias-fastapi-test
Version: 0.5.0
Summary: FastAPI Runtime for Azure Functions Python Worker
Author-email: "Azure Functions team at Microsoft Corp." <azurefunctions@microsoft.com>
Project-URL: Documentation, https://github.com/Azure/azure-functions-python-worker/blob/dev/runtimes/fastapi/README.md
Project-URL: Repository, https://github.com/Azure/azure-functions-python-worker
Keywords: azure,functions,azurefunctions,python,serverless,fastapi
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Environment :: Web Environment
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: azure-functions
Requires-Dist: azurefunctions-extensions-base
Requires-Dist: fastapi>=0.100.0
Requires-Dist: uvicorn>=0.20.0
Requires-Dist: starlette>=0.27.0
Provides-Extra: dev
Requires-Dist: flake8==6.*; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Requires-Dist: httpx; extra == "dev"
Requires-Dist: requests==2.*; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: pytest-sugar; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pytest-xdist; extra == "dev"
Requires-Dist: pytest-randomly; extra == "dev"
Requires-Dist: pytest-instafail; extra == "dev"
Requires-Dist: pytest-rerunfailures; extra == "dev"

# Azure Functions FastAPI Runtime

This package provides a runtime adapter to run FastAPI applications natively in Azure Functions Python Worker.

## Overview

The FastAPI runtime enables you to deploy existing FastAPI applications to Azure Functions without modifying your FastAPI code. The runtime:

1. Discovers FastAPI routes in your application
2. Converts each route to an Azure Function with HTTP trigger
3. Handles request forwarding between Azure Functions and FastAPI
4. Preserves FastAPI's request/response handling

## Usage

### Basic Example

Create a `function_app.py` with your FastAPI app:

```python
from fastapi import FastAPI

app = FastAPI()

@app.get("/hello")
async def hello():
    return {"message": "Hello from FastAPI on Azure Functions!"}

@app.post("/users")
async def create_user(name: str):
    return {"user": name, "status": "created"}
```

The runtime will automatically discover these routes and create corresponding Azure Functions.

## Architecture

- **Indexer**: Scans FastAPI app routes and generates function metadata
- **Converter**: Transforms FastAPI routes into Azure Functions structure
- **Handler**: Routes Azure Functions invocations to FastAPI
- **Request/Response Adapter**: Converts between Azure Functions and ASGI formats

## Requirements

- Python 3.9+
- FastAPI 0.100.0+
- Azure Functions Python Worker

## Installation

```bash
pip install azure-functions-fastapi-runtime
```

## Development Status

This is currently a prototype/alpha release for testing FastAPI integration with Azure Functions.
