Generate complete FastAPI applications from decorated Python business functions.
Project description
API Builder
Generate a FastAPI application from decorated Python business functions.
Install
pip install function-api-builder
Use
Create functions/example.py in your project:
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:
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file function_api_builder-0.1.0.tar.gz.
File metadata
- Download URL: function_api_builder-0.1.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0ea0d14aa1660b30a8a886d51b517bb454de24cb40e7b4577582d9a69d59079
|
|
| MD5 |
a116bf764772c9cfec2245920fcbd99f
|
|
| BLAKE2b-256 |
43ed7145ecaa418a074def0b25ae590d3b849bee1a7a289f56874b7a266ec2ab
|
File details
Details for the file function_api_builder-0.1.0-py3-none-any.whl.
File metadata
- Download URL: function_api_builder-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
588c1d83d047e0fac62e17486dc0c9ba24e622c18a7315486fb3f01082cb7399
|
|
| MD5 |
9cf330787608a244430dc0f0a75b9524
|
|
| BLAKE2b-256 |
08578b8b1b611e5742bc0c7b36ca0473d545956800c13de5082436ad19e848bc
|