Spaces:
Sleeping
Sleeping
Download code-review-env/sample_project_canonical/auth.py from Athmabhiram1/nodeaudit-openenv: direct link, hf CLI and curl.
- Browser
- Download file 275 Bytes
-
https://huggingface.co/spaces/Athmabhiram1/nodeaudit-openenv/resolve/main/code-review-env/sample_project_canonical/auth.py
- Command line
-
hf download hf://spaces/Athmabhiram1/nodeaudit-openenv/code-review-env/sample_project_canonical/auth.py
-
curl -L -o auth.py https://huggingface.co/spaces/Athmabhiram1/nodeaudit-openenv/resolve/main/code-review-env/sample_project_canonical/auth.py
275 Bytes
| from __future__ import annotations | |
| from typing import TypedDict | |
| class User(TypedDict): | |
| id: str | |
| card_token: str | |
| def validate_token(token: str) -> User | None: | |
| if token.startswith("tok_"): | |
| return {"id": token[-4:], "card_token": token} | |
| return None | |