Metadata-Version: 2.4
Name: exdrf-gen-al2rcv
Version: 0.1.19
Summary: Generate remote-controlled-view path module scaffolds from SQLAlchemy-backed ExDataset metadata.
Author-email: Nicu Tofan <nicu.tofan@gmail.com>
License-Expression: MIT
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Development Status :: 3 - Alpha
Classifier: Typing :: Typed
Requires-Python: >=3.12.2
Description-Content-Type: text/markdown
Requires-Dist: click<9,>=8.2.1
Requires-Dist: exdrf-al>=0.1.21
Requires-Dist: exdrf-gen>=0.1.17
Requires-Dist: exdrf-rcv>=0.1.17
Provides-Extra: dev
Requires-Dist: autoflake; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: pyproject-flake8; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pytest-mock; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: wheel; extra == "dev"

# exdrf-gen-al2rcv

The **remote-controlled-view (RCV)** stack renders **exdrf** resources and
companion data into UI shapes the SPA requests from the API.

**exdrf-gen-al2rcv** is an **`exdrf-gen`** plugin that emits FastAPI-oriented
**backend** modules: a root **`api.py`**, per-resource
**`{res_snake}_rcv_paths.py`** files under the category tree, and
**`exdrf-rcv`**-compatible plans derived from SQLAlchemy models.

We generate a plan for each resource type based on the information extracted
from SQLAlchemy database models.

Emitted layout includes a root **`__init__.py`** (imports **`api`**) and root
**`api.py`** (scaffold), one **`{res_snake}_rcv_paths.py`** per resource under
its category tree, and per-category **`__init__.py`** plus empty **`api.py`**.

## Command-line usage

```bash
exdrf-gen al2rcv DATASET OUT-PATH --get-db MODULE:CALLABLE
```

Or: `python -m exdrf_gen al2rcv ...`.

- **DATASET** — `module.path:DeclarativeBase` (same **`GetDataset`** convention
  as **`al2r`**).
- **OUT-PATH** — output directory (or **`EXDRF_AL2RCV_PATH`**).
- **`--get-db`** / **`EXDRF_AL2RCV_GET_DB`** — required
  ``dotted.module:callable`` for root ``api.py`` (same shape as **`al2r`**’s
  ``--get-db`` / ``EXDRF_AL2R_GET_DB``).

## Dependencies

**`exdrf-gen`**, **`exdrf-al`**, **`exdrf-rcv`**, **`click`**. Generated root
``api.py`` imports **FastAPI** and **SQLAlchemy** (add them in the host app).

## Plugin registration

```toml
[project.entry-points.'exdrf.plugins']
exdrf_gen = 'exdrf_gen_al2rcv'
```

## See also

- **`exdrf-rcv`** — shared runtime imported by generated RCV modules.
- **`exdrf-gen-al2r`** — FastAPI routers; same folder pattern for categories.
- **`exdrf-gen`** — [`README.md`](../exdrf-gen/README.md).
