Download app/schemas/admin/admin_mgmt.py from binhugg2/api: direct link, hf CLI and curl.
- Browser
- Download file 584 Bytes
-
https://huggingface.co/spaces/binhugg2/api/resolve/main/app/schemas/admin/admin_mgmt.py
- Command line
-
hf download hf://spaces/binhugg2/api/app/schemas/admin/admin_mgmt.py
-
curl -L -o admin_mgmt.py https://huggingface.co/spaces/binhugg2/api/resolve/main/app/schemas/admin/admin_mgmt.py
584 Bytes
| from pydantic import BaseModel, Field | |
| class AdminCreateRequest(BaseModel): | |
| username: str = Field(..., min_length=3, max_length=50) | |
| password: str = Field(..., min_length=6, max_length=100) | |
| nickname: str | None = Field(None, max_length=50) | |
| class AdminUpdateRequest(BaseModel): | |
| nickname: str | None = Field(None, max_length=50) | |
| is_active: bool | None = None | |
| class AdminResetPasswordRequest(BaseModel): | |
| password: str = Field(..., min_length=6, max_length=100) | |
| class AdminAssignRolesRequest(BaseModel): | |
| role_ids: list[int] = Field(default_factory=list) | |