Metadata-Version: 2.4
Name: function-api-builder
Version: 0.1.0
Summary: Generate complete FastAPI applications from decorated Python business functions.
Author: Sushruth Samson
License-Expression: MIT
Keywords: api-builder,api-generator,backend,code-generation,fastapi,pydantic
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Code Generators
Requires-Python: >=3.11
Requires-Dist: fastapi>=0.115
Requires-Dist: pydantic>=2.7
Requires-Dist: uvicorn>=0.30
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: httpx>=0.27; extra == 'dev'
Requires-Dist: mypy>=1.13; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Requires-Dist: twine>=6; extra == 'dev'
Description-Content-Type: text/markdown

# API Builder

Generate a FastAPI application from decorated Python business functions.

## Install

```bash
pip install function-api-builder
```

## Use

Create `functions/example.py` in your project:

```python
from pydantic import BaseModel
from api_builder_runtime import function


class Input(BaseModel):
    value: str


class Output(BaseModel):
    result: str


@function(service="example", step=1)
def run(payload: Input, deps, context) -> Output:
    return Output(result=payload.value)
```

Then run:

```bash
api-builder
```

The builder writes a complete `app/` FastAPI application with a public service route, optional local development routes, health checks, OpenAPI, and generated tests.

The function signature must be `(payload, deps, context)`, with Pydantic models for the payload and return value. See `examples/basic/functions/pdf_summary.py` for a multi-step service.
