initial commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
from typing import Literal
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
SwitchType = Literal["cherry-mx-blue", "cherry-mx-red", "cherry-mx-brown"]
|
||||
|
||||
|
||||
class Marker(BaseModel):
|
||||
id: str
|
||||
time: float = Field(ge=0)
|
||||
key: str
|
||||
|
||||
|
||||
class Project(BaseModel):
|
||||
version: int = 1
|
||||
switch: SwitchType = "cherry-mx-blue"
|
||||
markers: list[Marker] = Field(default_factory=list)
|
||||
|
||||
|
||||
class ExportRequest(BaseModel):
|
||||
duration: float = Field(gt=0)
|
||||
switch: SwitchType = "cherry-mx-blue"
|
||||
markers: list[Marker] = Field(default_factory=list)
|
||||
Reference in New Issue
Block a user