Metadata-Version: 2.4
Name: mattergraph-api
Version: 0.1.0
Summary: FastAPI service for the MatterGraph demo and integrations.
Project-URL: Homepage, https://github.com/cyrusmo/MatterGraph
Project-URL: Repository, https://github.com/cyrusmo/MatterGraph
Project-URL: Issues, https://github.com/cyrusmo/MatterGraph/issues
Project-URL: Changelog, https://github.com/cyrusmo/MatterGraph/blob/main/CHANGELOG.md
Author: MatterGraph contributors
License-Expression: Apache-2.0
Keywords: api,fastapi,materials-informatics,materials-science
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Requires-Dist: fastapi>=0.110
Requires-Dist: mattergraph-connectors~=0.1.0
Requires-Dist: mattergraph-core~=0.1.0
Requires-Dist: mattergraph-sim~=0.1.0
Requires-Dist: pydantic-settings>=2.2
Requires-Dist: pydantic>=2.5
Requires-Dist: pymatgen>=2024.1.1
Requires-Dist: uvicorn[standard]>=0.29.0
Description-Content-Type: text/markdown

# mattergraph-api

FastAPI demo service for [MatterGraph](https://github.com/cyrusmo/MatterGraph).

This is a **demonstration surface**, not a production service: storage is an in-memory store loaded from a JSONL fixture, and the persistence layer under `mattergraph_api/db/` is a placeholder for installations that need one.

## Routes

| Route | Purpose |
|---|---|
| `GET /health` | Liveness |
| `GET /materials`, `GET /materials/{mid}` | Browse normalized records |
| `GET /search?element=` | Filter by element |
| `POST /scores/rank` | Rank candidates with objectives, constraints, and weights |
| `POST /simulations/ase/relax` | Run an ASE relaxation (503 if `ase` is unavailable) |
| `GET /workflows/lematerial/demo` | End-to-end LeMat-Bulk screening walkthrough |

## Install and run

```bash
pip install mattergraph-api
export MATTERGRAPH_DEMO_DATA=data/demo/materials_sample.jsonl
uvicorn mattergraph_api.main:app --host 0.0.0.0 --port 8000
```

## License

Apache-2.0
