-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrequests.py
More file actions
executable file
·41 lines (32 loc) · 840 Bytes
/
requests.py
File metadata and controls
executable file
·41 lines (32 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from pydantic import BaseModel, Field
from typing import Optional
from datetime import datetime
class Login(BaseModel):
username_or_email: str
password: str
class ModifyUser(BaseModel):
email: str
username: str
password: str
class ResetKey(BaseModel):
reset_key: str
class LikePost(BaseModel):
score: int
class ResetPasswordCreds(BaseModel):
email: str
class ModifyItem(BaseModel):
name: str
description: str
instructions: str
license: str
version: str
class ModifyProfile(BaseModel):
fullname: str
location: str
company: str
biography: str
class RevisionUpload(BaseModel):
item_revision_id: int
class PageRequest(BaseModel):
limit: Optional[int] = Field(20, gt=0, le=100)
offset: Optional[int] = Field(0, gt=0)