-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi_keys.py
More file actions
38 lines (27 loc) · 690 Bytes
/
api_keys.py
File metadata and controls
38 lines (27 loc) · 690 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
from datetime import datetime
from uuid import UUID
from pydantic import BaseModel, ConfigDict
class ApiKeyCreate(BaseModel):
label: str
description: str | None = None
class ApiKeyResponse(BaseModel):
id: UUID
label: str
description: str | None
secret: str
created_at: datetime
active: bool
model_config = ConfigDict(from_attributes=True)
class ApiKeyListItem(BaseModel):
id: UUID
label: str
description: str | None
masked_secret: str
secret: str
created_at: datetime
active: bool
model_config = ConfigDict(from_attributes=True)
class EndpointInfo(BaseModel):
method: str
path: str
description: str