This repository has been archived by the owner on Jan 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.py
74 lines (65 loc) · 1.52 KB
/
models.py
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
from dataclasses import dataclass
from dataclasses import asdict as dataclasses_dict
class BaseModel(object):
def to_dict(self):
return dataclasses_dict(self)
def to_dict_list(self):
return {k: [v] for k, v in self.to_dict().items()}
@dataclass(frozen=True)
class Repository(BaseModel):
id: int
name: str
organization_name: str
platform: str
repository_url: str
description: str
default_branch: str
is_fork: bool
is_archived: bool
creation_date: str
last_update: str
last_modification: str
homepage: str
stars_count: int
forks_count: int
license: str
open_issues_count: int
language: str
topics: str
software_heritage_exists: bool
software_heritage_url: str
@dataclass(frozen=True)
class Organization(BaseModel):
login: str
description: str
name: str
organization_url: str
avatar_url: str
website: str
location: str
email: str
is_verified: bool
repositories_count: int
creation_date: str
platform: str
@dataclass(frozen=True)
class Library(BaseModel):
deprecation_reason: bool
description: str
forks: int
homepage: str
keywords: str
language: str
latest_download_url: str
latest_stable_release_number: str
latest_stable_release_published_at: str
license_normalized: bool
licenses: str
name: str
normalized_licenses: str
library_manager_url: str
platform: str
rank: int
repository_url: str
stars: int
status:str