Spaces:
Running
Running
Download src/eval_entity_registry/api/deps.py from evaleval/entity-registry: direct link, hf CLI and curl.
- Browser
- Download file 282 Bytes
-
https://huggingface.co/spaces/evaleval/entity-registry/resolve/main/src/eval_entity_registry/api/deps.py
- Command line
-
hf download hf://spaces/evaleval/entity-registry/src/eval_entity_registry/api/deps.py
-
curl -L -o deps.py https://huggingface.co/spaces/evaleval/entity-registry/resolve/main/src/eval_entity_registry/api/deps.py
282 Bytes
| from fastapi import Depends, HTTPException | |
| from eval_entity_registry.config import settings | |
| def check_writable(): | |
| if settings.read_only: | |
| raise HTTPException(status_code=405, detail="Write operations disabled in read-only mode") | |
| writable = [Depends(check_writable)] | |