Download src/interfaces/auth.py from kbl2810/test: direct link, hf CLI and curl.
- Browser
- Download file 332 Bytes
-
https://huggingface.co/spaces/kbl2810/test/resolve/main/src/interfaces/auth.py
- Command line
-
hf download hf://spaces/kbl2810/test/src/interfaces/auth.py
-
curl -L -o auth.py https://huggingface.co/spaces/kbl2810/test/resolve/main/src/interfaces/auth.py
332 Bytes
| from pydantic import BaseModel, Field | |
| class ILogin(BaseModel): | |
| username: str | |
| password: str | |
| class IPagination(BaseModel): | |
| paging: int = Field(1, ge=1) | |
| limit: int = Field(10, ge=1) | |
| sort_by: str = "id", | |
| sort_order: str = 'asc', | |
| def offset(self): | |
| return (self.page - 1) * self.limit | |