scaffold_restful_api
Generate a complete runnable clearskies REST API for a single model, bundling model, endpoint, and context into one file.
Instructions
Generate a complete, runnable clearskies REST API application for a single model.
This is a convenience tool that generates a model, a RestfulApi endpoint, and a context
in a single file ready to run.
Args:
model_name: Model class name in PascalCase (e.g. "User").
columns: List of column definitions. Each dict has:
- name (str): Column name
- type (str): Column type
- options (dict, optional): Column constructor options
url: URL path (default: auto-generated from model name).
backend_type: Backend type (default: "MemoryBackend").
backend_options: Backend constructor options.
authentication: Authentication expression.
context_type: Context type (default: "WsgiRef").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| columns | Yes | ||
| model_name | Yes | ||
| backend_type | No | MemoryBackend | |
| context_type | No | WsgiRef | |
| authentication | No | ||
| backend_options | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |