Metadata-Version: 2.4
Name: ldaca-wordflow
Version: 0.7.1
Summary: LDaCA Wordflow - FastAPI backend with bundled production frontend for the Language Data Commons of Australia
Author: Australian Text Analytics Platform
License: MIT
Keywords: corpus,fastapi,ldaca,linguistics,text-analytics,web-app
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.14
Requires-Dist: aiosqlite>=0.21.0
Requires-Dist: anthropic>=0.40.0
Requires-Dist: duckdb>=1.4.0
Requires-Dist: fastapi>=0.138.0
Requires-Dist: fastexcel>=0.18.0
Requires-Dist: google-auth[requests]>=2.38.0
Requires-Dist: google-genai>=1.0.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: openai>=2.26.0
Requires-Dist: polars-source-utils>=0.2.0
Requires-Dist: polars-text>=0.4.0
Requires-Dist: psutil>=6.1.0
Requires-Dist: pydantic-settings>=2.0.0
Requires-Dist: python-multipart>=0.0.20
Requires-Dist: rtoml>=0.12.0
Requires-Dist: scikit-learn>=1.5.0
Requires-Dist: spacy>=3.7.0
Requires-Dist: tbb>=2022.3.1; sys_platform != 'darwin'
Requires-Dist: tzdata>=2025.2; sys_platform == 'win32'
Requires-Dist: uvicorn[standard]>=0.35.0
Provides-Extra: deploy
Requires-Dist: ipython>=9.5.0; extra == 'deploy'
Requires-Dist: jupyter-server-proxy>=4.4.0; extra == 'deploy'
Description-Content-Type: text/markdown

# LDaCA Wordflow Backend

FastAPI service for LDaCA Wordflow. The package can run the API by itself or
serve the bundled production frontend from the same process.

## Quick start

```bash
# Install and run (backend + frontend on one port)
uvx ldaca-wordflow

# Or run only the backend API
uvx ldaca-wordflow --backend

# Custom port
uvx ldaca-wordflow --port 9000
```

## Notebook and BinderHub launch

Use the asynchronous launcher when Python must retain control of the event loop,
such as a BinderHub notebook cell:

```python
from ldaca_wordflow import start_async_server

server = await start_async_server()
# The compiled web application is now ready through jupyter-server-proxy.

await server.close()
```

`start_async_server()` returns only after ASGI lifespan startup succeeds. Its
caller-owned handle supports waiting and bounded graceful shutdown. Under
JupyterHub, the launcher derives the proxy `root_path` from
`JUPYTERHUB_SERVICE_PREFIX`.

## Development

- Backend architecture: [`../docs/architecture/backend/overview.md`](../docs/architecture/backend/overview.md)
- HTTP endpoint inventory: [`../docs/reference/backend-api.md`](../docs/reference/backend-api.md)
- Settings reference: [`../docs/reference/backend-settings.md`](../docs/reference/backend-settings.md)
- Lint: `uv run ruff check .`
- Type check: `uv run ty check`
- Tests: `uv run pytest -q`
- OpenAPI export: `uv run python scripts/export_openapi.py --output <path>`
