-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
29 lines (20 loc) · 816 Bytes
/
models.py
File metadata and controls
29 lines (20 loc) · 816 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
"""Pydantic models for Kwork parser data."""
from __future__ import annotations
from pydantic import BaseModel, Field
class KworkItem(BaseModel):
subcategory: str | None = None
parent_slug: str | None = None
category_slug: str | None = None
id: int | None = None
url: str | None = None
gtitle: str | None = None
price: float | None = None
days: int | None = None
rating: int | None = Field(default=None, description="Review count")
userRating: float | None = Field(default=None, description="Percentage 0-100")
convertedUserRating: float | None = Field(default=None, description="Stars, e.g. 4.9")
userName: str | None = None
sellerLevel: int | None = None
queueCount: int | None = None
topBadge: bool | None = None
isFrom: bool | None = None