Metadata-Version: 2.4
Name: aimdl-dashboard-api
Version: 0.1.9
Summary: FastAPI backend for the AIMD-L visualization dashboard
Author-email: David Elbert <elbert@jhu.edu>
License: MIT
Keywords: materials-science,dashboard,girder,aimd-l,visualization
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: fastapi>=0.115
Requires-Dist: uvicorn[standard]>=0.30
Requires-Dist: girder-client>=3.2
Requires-Dist: httpx>=0.27
Requires-Dist: requests>=2.28
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
Requires-Dist: coverage>=7.0; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"

# aimdl-dashboard-api

FastAPI backend for the [AIMD-L visualization dashboard](https://github.com/htmdec/aimdl_dashboard),
the real-time laboratory dashboard for the Autonomous Instrumented Materials Discovery
Laboratory (AIMD-L) at Johns Hopkins University.

The backend authenticates to the [HTMDEC Girder data portal](https://data.htmdec.org),
walks instrument folder hierarchies (MAXIMA, HELIX, SPHINX), and proxies visualization
PNGs to the frontend so the browser never needs Girder credentials.

## Installation

```bash
pip install aimdl-dashboard-api
```

## Usage

Set your Girder API key (obtain from `https://data.htmdec.org` → Account → API Keys),
then launch the server:

```bash
export AIMDL_API_KEY="your-key-here"
aimdl-dashboard --port 8000
```

Options:

```
aimdl-dashboard --host 0.0.0.0 --port 8000 [--reload]
```

The API will be available at `http://localhost:8000/api` and the OpenAPI docs
at `http://localhost:8000/docs`.

## Environment variables

| Variable         | Required | Description                                   |
|------------------|----------|-----------------------------------------------|
| `AIMDL_API_KEY`  | Yes      | Girder API key for `data.htmdec.org`          |
| `GIRDER_API_URL` | No       | Override Girder API URL (default: htmdec.org) |
| `PER_INSTRUMENT_LIMIT`   | No       | Items fetched per data type from Girder on cache refresh (default: `100`) |
| `DEFAULT_PER_INSTRUMENT` | No       | Items returned per instrument in API responses (default: `30`)            |

## Documentation

See the [main repository README](https://github.com/htmdec/aimdl_dashboard) for
full architecture, frontend setup, kiosk deployment, and development notes.

## License

MIT
