kaggle 1.8.2__py3-none-any.whl → 1.8.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. kaggle/__init__.py +1 -1
  2. kaggle/api/kaggle_api_extended.py +24 -2
  3. {kaggle-1.8.2.dist-info → kaggle-1.8.3.dist-info}/METADATA +3 -3
  4. kaggle-1.8.3.dist-info/RECORD +28 -0
  5. {kaggle-1.8.2.dist-info → kaggle-1.8.3.dist-info}/WHEEL +1 -1
  6. kaggle-1.8.2.dist-info/RECORD +0 -148
  7. kagglesdk/LICENSE +0 -201
  8. kagglesdk/__init__.py +0 -6
  9. kagglesdk/admin/__init__.py +0 -0
  10. kagglesdk/admin/services/__init__.py +0 -0
  11. kagglesdk/admin/services/inbox_file_service.py +0 -22
  12. kagglesdk/admin/types/__init__.py +0 -0
  13. kagglesdk/admin/types/inbox_file_service.py +0 -74
  14. kagglesdk/benchmarks/__init__.py +0 -0
  15. kagglesdk/benchmarks/services/__init__.py +0 -0
  16. kagglesdk/benchmarks/services/benchmarks_api_service.py +0 -19
  17. kagglesdk/benchmarks/types/__init__.py +0 -0
  18. kagglesdk/benchmarks/types/benchmark_types.py +0 -307
  19. kagglesdk/benchmarks/types/benchmarks_api_service.py +0 -243
  20. kagglesdk/blobs/__init__.py +0 -0
  21. kagglesdk/blobs/services/__init__.py +0 -0
  22. kagglesdk/blobs/services/blob_api_service.py +0 -25
  23. kagglesdk/blobs/types/__init__.py +0 -0
  24. kagglesdk/blobs/types/blob_api_service.py +0 -177
  25. kagglesdk/common/__init__.py +0 -0
  26. kagglesdk/common/services/__init__.py +0 -0
  27. kagglesdk/common/services/operations_service.py +0 -46
  28. kagglesdk/common/types/__init__.py +0 -0
  29. kagglesdk/common/types/file_download.py +0 -102
  30. kagglesdk/common/types/http_redirect.py +0 -105
  31. kagglesdk/common/types/operations.py +0 -194
  32. kagglesdk/common/types/operations_service.py +0 -48
  33. kagglesdk/community/__init__.py +0 -0
  34. kagglesdk/community/types/__init__.py +0 -0
  35. kagglesdk/community/types/content_enums.py +0 -44
  36. kagglesdk/community/types/organization.py +0 -410
  37. kagglesdk/competitions/__init__.py +0 -0
  38. kagglesdk/competitions/services/__init__.py +0 -0
  39. kagglesdk/competitions/services/competition_api_service.py +0 -178
  40. kagglesdk/competitions/types/__init__.py +0 -0
  41. kagglesdk/competitions/types/competition.py +0 -14
  42. kagglesdk/competitions/types/competition_api_service.py +0 -2393
  43. kagglesdk/competitions/types/competition_enums.py +0 -53
  44. kagglesdk/competitions/types/search_competitions.py +0 -28
  45. kagglesdk/competitions/types/submission_status.py +0 -9
  46. kagglesdk/datasets/__init__.py +0 -0
  47. kagglesdk/datasets/databundles/__init__.py +0 -0
  48. kagglesdk/datasets/databundles/types/__init__.py +0 -0
  49. kagglesdk/datasets/databundles/types/databundle_api_types.py +0 -540
  50. kagglesdk/datasets/services/__init__.py +0 -0
  51. kagglesdk/datasets/services/dataset_api_service.py +0 -195
  52. kagglesdk/datasets/types/__init__.py +0 -0
  53. kagglesdk/datasets/types/dataset_api_service.py +0 -3047
  54. kagglesdk/datasets/types/dataset_enums.py +0 -103
  55. kagglesdk/datasets/types/dataset_service.py +0 -145
  56. kagglesdk/datasets/types/dataset_types.py +0 -646
  57. kagglesdk/datasets/types/search_datasets.py +0 -6
  58. kagglesdk/discussions/__init__.py +0 -0
  59. kagglesdk/discussions/types/__init__.py +0 -0
  60. kagglesdk/discussions/types/search_discussions.py +0 -43
  61. kagglesdk/discussions/types/writeup_enums.py +0 -11
  62. kagglesdk/education/__init__.py +0 -0
  63. kagglesdk/education/services/__init__.py +0 -0
  64. kagglesdk/education/services/education_api_service.py +0 -19
  65. kagglesdk/education/types/__init__.py +0 -0
  66. kagglesdk/education/types/education_api_service.py +0 -248
  67. kagglesdk/education/types/education_service.py +0 -139
  68. kagglesdk/kaggle_client.py +0 -101
  69. kagglesdk/kaggle_creds.py +0 -148
  70. kagglesdk/kaggle_env.py +0 -104
  71. kagglesdk/kaggle_http_client.py +0 -269
  72. kagglesdk/kaggle_oauth.py +0 -200
  73. kagglesdk/kaggle_object.py +0 -344
  74. kagglesdk/kernels/__init__.py +0 -0
  75. kagglesdk/kernels/services/__init__.py +0 -0
  76. kagglesdk/kernels/services/kernels_api_service.py +0 -146
  77. kagglesdk/kernels/types/__init__.py +0 -0
  78. kagglesdk/kernels/types/kernels_api_service.py +0 -2451
  79. kagglesdk/kernels/types/kernels_enums.py +0 -39
  80. kagglesdk/kernels/types/search_kernels.py +0 -6
  81. kagglesdk/licenses/__init__.py +0 -0
  82. kagglesdk/licenses/types/__init__.py +0 -0
  83. kagglesdk/licenses/types/licenses_types.py +0 -182
  84. kagglesdk/models/__init__.py +0 -0
  85. kagglesdk/models/services/__init__.py +0 -0
  86. kagglesdk/models/services/model_api_service.py +0 -280
  87. kagglesdk/models/services/model_service.py +0 -19
  88. kagglesdk/models/types/__init__.py +0 -0
  89. kagglesdk/models/types/model_api_service.py +0 -4069
  90. kagglesdk/models/types/model_enums.py +0 -68
  91. kagglesdk/models/types/model_service.py +0 -275
  92. kagglesdk/models/types/model_types.py +0 -1338
  93. kagglesdk/models/types/search_models.py +0 -8
  94. kagglesdk/search/__init__.py +0 -0
  95. kagglesdk/search/services/__init__.py +0 -0
  96. kagglesdk/search/services/search_api_service.py +0 -19
  97. kagglesdk/search/types/__init__.py +0 -0
  98. kagglesdk/search/types/search_api_service.py +0 -2435
  99. kagglesdk/search/types/search_content_shared.py +0 -50
  100. kagglesdk/search/types/search_enums.py +0 -45
  101. kagglesdk/search/types/search_service.py +0 -303
  102. kagglesdk/security/__init__.py +0 -0
  103. kagglesdk/security/services/__init__.py +0 -0
  104. kagglesdk/security/services/iam_service.py +0 -31
  105. kagglesdk/security/services/oauth_service.py +0 -58
  106. kagglesdk/security/types/__init__.py +0 -0
  107. kagglesdk/security/types/authentication.py +0 -171
  108. kagglesdk/security/types/iam_service.py +0 -496
  109. kagglesdk/security/types/oauth_service.py +0 -1181
  110. kagglesdk/security/types/roles.py +0 -8
  111. kagglesdk/security/types/security_types.py +0 -159
  112. kagglesdk/test/__init__.py +0 -0
  113. kagglesdk/test/test_client.py +0 -41
  114. kagglesdk/users/__init__.py +0 -0
  115. kagglesdk/users/services/__init__.py +0 -0
  116. kagglesdk/users/services/account_service.py +0 -31
  117. kagglesdk/users/services/group_api_service.py +0 -31
  118. kagglesdk/users/types/__init__.py +0 -0
  119. kagglesdk/users/types/account_service.py +0 -345
  120. kagglesdk/users/types/group_api_service.py +0 -315
  121. kagglesdk/users/types/group_types.py +0 -165
  122. kagglesdk/users/types/groups_enum.py +0 -8
  123. kagglesdk/users/types/progression_service.py +0 -9
  124. kagglesdk/users/types/search_users.py +0 -23
  125. kagglesdk/users/types/user_avatar.py +0 -226
  126. kagglesdk/users/types/users_enums.py +0 -22
  127. {kaggle-1.8.2.dist-info → kaggle-1.8.3.dist-info}/entry_points.txt +0 -0
  128. {kaggle-1.8.2.dist-info → kaggle-1.8.3.dist-info}/licenses/LICENSE.txt +0 -0
@@ -1,53 +0,0 @@
1
- import enum
2
-
3
- class CompetitionListTab(enum.Enum):
4
- COMPETITION_LIST_TAB_GENERAL = 0
5
- """TODO(aip.dev/126): (-- api-linter: core::0126::unspecified=disabled --)"""
6
- COMPETITION_LIST_TAB_ENTERED = 1
7
- COMPETITION_LIST_TAB_COMMUNITY = 2
8
- COMPETITION_LIST_TAB_HOSTED = 3
9
- COMPETITION_LIST_TAB_UNLAUNCHED = 4
10
- COMPETITION_LIST_TAB_UNLAUNCHED_COMMUNITY = 5
11
- COMPETITION_LIST_TAB_EVERYTHING = 6
12
-
13
- class CompetitionSortBy(enum.Enum):
14
- COMPETITION_SORT_BY_GROUPED = 0
15
- """TODO(aip.dev/126): (-- api-linter: core::0126::unspecified=disabled --)"""
16
- COMPETITION_SORT_BY_BEST = 1
17
- COMPETITION_SORT_BY_PRIZE = 2
18
- COMPETITION_SORT_BY_EARLIEST_DEADLINE = 3
19
- COMPETITION_SORT_BY_LATEST_DEADLINE = 4
20
- COMPETITION_SORT_BY_NUMBER_OF_TEAMS = 5
21
- COMPETITION_SORT_BY_RELEVANCE = 6
22
- COMPETITION_SORT_BY_RECENTLY_CREATED = 7
23
-
24
- class HostSegment(enum.Enum):
25
- r"""
26
- NOTE: Keep in Sync with Kaggle.Entities.HostSegment until migrated! Also keep
27
- the comment in
28
- competition_service.ListCompetitionsRequest.Selector.host_segment_id_filter
29
- up to date
30
- """
31
- HOST_SEGMENT_UNSPECIFIED = 0
32
- HOST_SEGMENT_FEATURED = 1
33
- HOST_SEGMENT_GETTING_STARTED = 5
34
- HOST_SEGMENT_MASTERS = 6
35
- HOST_SEGMENT_PLAYGROUND = 8
36
- HOST_SEGMENT_RECRUITMENT = 3
37
- HOST_SEGMENT_RESEARCH = 2
38
- HOST_SEGMENT_COMMUNITY = 10
39
- HOST_SEGMENT_ANALYTICS = 11
40
-
41
- class SubmissionGroup(enum.Enum):
42
- SUBMISSION_GROUP_ALL = 0
43
- """TODO(aip.dev/126): (-- api-linter: core::0126::unspecified=disabled --)"""
44
- SUBMISSION_GROUP_SUCCESSFUL = 1
45
- SUBMISSION_GROUP_SELECTED = 2
46
-
47
- class SubmissionSortBy(enum.Enum):
48
- SUBMISSION_SORT_BY_DATE = 0
49
- """TODO(aip.dev/126): (-- api-linter: core::0126::unspecified=disabled --)"""
50
- SUBMISSION_SORT_BY_NAME = 1
51
- SUBMISSION_SORT_BY_PRIVATE_SCORE = 2
52
- SUBMISSION_SORT_BY_PUBLIC_SCORE = 3
53
-
@@ -1,28 +0,0 @@
1
- import enum
2
-
3
- class SearchCompetitionsOrderBy(enum.Enum):
4
- SEARCH_COMPETITIONS_ORDER_BY_UNSPECIFIED = 0
5
- SEARCH_COMPETITIONS_ORDER_BY_DEADLINE = 1
6
- SEARCH_COMPETITIONS_ORDER_BY_PRIZE_VALUE = 2
7
- SEARCH_COMPETITIONS_ORDER_BY_TEAM_RANK = 3
8
- SEARCH_COMPETITIONS_ORDER_BY_LAST_SUBMISSION_DATE = 4
9
-
10
- class SearchCompetitionsProfileVisibility(enum.Enum):
11
- SEARCH_COMPETITIONS_PROFILE_VISIBILITY_ANY = 0
12
- SEARCH_COMPETITIONS_PROFILE_VISIBILITY_VISIBLE = 1
13
- SEARCH_COMPETITIONS_PROFILE_VISIBILITY_HIDDEN = 2
14
-
15
- class SearchCompetitionsRole(enum.Enum):
16
- SEARCH_COMPETITIONS_ROLE_ANY = 0
17
- SEARCH_COMPETITIONS_ROLE_HOST = 1
18
- SEARCH_COMPETITIONS_ROLE_PARTICIPANT = 2
19
- SEARCH_COMPETITIONS_ROLE_PARTICIPANT_ONLY = 3
20
- """Excludes competitions user hosted, even if they are also a participant"""
21
- SEARCH_COMPETITIONS_ROLE_JUDGE = 4
22
-
23
- class SearchCompetitionsStatus(enum.Enum):
24
- SEARCH_COMPETITIONS_STATUS_ANY = 0
25
- SEARCH_COMPETITIONS_STATUS_ACTIVE = 1
26
- SEARCH_COMPETITIONS_STATUS_COMPLETE = 2
27
- SEARCH_COMPETITIONS_STATUS_UNLAUNCHED = 3
28
-
@@ -1,9 +0,0 @@
1
- import enum
2
-
3
- class SubmissionStatus(enum.Enum):
4
- """TODO(aip.dev/216): (-- api-linter: core::0216::synonyms=disabled --)"""
5
- PENDING = 0
6
- """TODO(aip.dev/126): (-- api-linter: core::0126::unspecified=disabled --)"""
7
- COMPLETE = 1
8
- ERROR = 2
9
-
File without changes
File without changes
File without changes
@@ -1,540 +0,0 @@
1
- from datetime import datetime
2
- from kagglesdk.kaggle_object import *
3
- from typing import List, Optional
4
-
5
- class ApiColumnSummaryInfo(KaggleObject):
6
- r"""
7
- Attributes:
8
- total_column_count (int)
9
- column_types (ApiColumnTypeSummaryInfo)
10
- """
11
-
12
- def __init__(self):
13
- self._total_column_count = 0
14
- self._column_types = []
15
- self._freeze()
16
-
17
- @property
18
- def total_column_count(self) -> int:
19
- return self._total_column_count
20
-
21
- @total_column_count.setter
22
- def total_column_count(self, total_column_count: int):
23
- if total_column_count is None:
24
- del self.total_column_count
25
- return
26
- if not isinstance(total_column_count, int):
27
- raise TypeError('total_column_count must be of type int')
28
- self._total_column_count = total_column_count
29
-
30
- @property
31
- def column_types(self) -> Optional[List[Optional['ApiColumnTypeSummaryInfo']]]:
32
- return self._column_types
33
-
34
- @column_types.setter
35
- def column_types(self, column_types: Optional[List[Optional['ApiColumnTypeSummaryInfo']]]):
36
- if column_types is None:
37
- del self.column_types
38
- return
39
- if not isinstance(column_types, list):
40
- raise TypeError('column_types must be of type list')
41
- if not all([isinstance(t, ApiColumnTypeSummaryInfo) for t in column_types]):
42
- raise TypeError('column_types must contain only items of type ApiColumnTypeSummaryInfo')
43
- self._column_types = column_types
44
-
45
-
46
- class ApiColumnTypeSummaryInfo(KaggleObject):
47
- r"""
48
- Attributes:
49
- column_type (str)
50
- column_count (int)
51
- """
52
-
53
- def __init__(self):
54
- self._column_type = None
55
- self._column_count = 0
56
- self._freeze()
57
-
58
- @property
59
- def column_type(self) -> str:
60
- return self._column_type or ""
61
-
62
- @column_type.setter
63
- def column_type(self, column_type: Optional[str]):
64
- if column_type is None:
65
- del self.column_type
66
- return
67
- if not isinstance(column_type, str):
68
- raise TypeError('column_type must be of type str')
69
- self._column_type = column_type
70
-
71
- @property
72
- def column_count(self) -> int:
73
- return self._column_count
74
-
75
- @column_count.setter
76
- def column_count(self, column_count: int):
77
- if column_count is None:
78
- del self.column_count
79
- return
80
- if not isinstance(column_count, int):
81
- raise TypeError('column_count must be of type int')
82
- self._column_count = column_count
83
-
84
-
85
- class ApiDirectory(KaggleObject):
86
- r"""
87
- Attributes:
88
- name (str)
89
- relative_url (str)
90
- total_directories (int)
91
- total_files (int)
92
- total_children (int)
93
- """
94
-
95
- def __init__(self):
96
- self._name = None
97
- self._relative_url = None
98
- self._total_directories = 0
99
- self._total_files = 0
100
- self._total_children = 0
101
- self._freeze()
102
-
103
- @property
104
- def name(self) -> str:
105
- return self._name or ""
106
-
107
- @name.setter
108
- def name(self, name: Optional[str]):
109
- if name is None:
110
- del self.name
111
- return
112
- if not isinstance(name, str):
113
- raise TypeError('name must be of type str')
114
- self._name = name
115
-
116
- @property
117
- def relative_url(self) -> str:
118
- return self._relative_url or ""
119
-
120
- @relative_url.setter
121
- def relative_url(self, relative_url: Optional[str]):
122
- if relative_url is None:
123
- del self.relative_url
124
- return
125
- if not isinstance(relative_url, str):
126
- raise TypeError('relative_url must be of type str')
127
- self._relative_url = relative_url
128
-
129
- @property
130
- def total_directories(self) -> int:
131
- return self._total_directories
132
-
133
- @total_directories.setter
134
- def total_directories(self, total_directories: int):
135
- if total_directories is None:
136
- del self.total_directories
137
- return
138
- if not isinstance(total_directories, int):
139
- raise TypeError('total_directories must be of type int')
140
- self._total_directories = total_directories
141
-
142
- @property
143
- def total_files(self) -> int:
144
- return self._total_files
145
-
146
- @total_files.setter
147
- def total_files(self, total_files: int):
148
- if total_files is None:
149
- del self.total_files
150
- return
151
- if not isinstance(total_files, int):
152
- raise TypeError('total_files must be of type int')
153
- self._total_files = total_files
154
-
155
- @property
156
- def total_children(self) -> int:
157
- return self._total_children
158
-
159
- @total_children.setter
160
- def total_children(self, total_children: int):
161
- if total_children is None:
162
- del self.total_children
163
- return
164
- if not isinstance(total_children, int):
165
- raise TypeError('total_children must be of type int')
166
- self._total_children = total_children
167
-
168
-
169
- class ApiDirectoryContent(KaggleObject):
170
- r"""
171
- Attributes:
172
- directories (ApiDirectory)
173
- files (ApiFile)
174
- total_children (int)
175
- total_directories (int)
176
- total_files (int)
177
- next_page_token (str)
178
- """
179
-
180
- def __init__(self):
181
- self._directories = []
182
- self._files = []
183
- self._total_children = 0
184
- self._total_directories = 0
185
- self._total_files = 0
186
- self._next_page_token = ""
187
- self._freeze()
188
-
189
- @property
190
- def directories(self) -> Optional[List[Optional['ApiDirectory']]]:
191
- return self._directories
192
-
193
- @directories.setter
194
- def directories(self, directories: Optional[List[Optional['ApiDirectory']]]):
195
- if directories is None:
196
- del self.directories
197
- return
198
- if not isinstance(directories, list):
199
- raise TypeError('directories must be of type list')
200
- if not all([isinstance(t, ApiDirectory) for t in directories]):
201
- raise TypeError('directories must contain only items of type ApiDirectory')
202
- self._directories = directories
203
-
204
- @property
205
- def files(self) -> Optional[List[Optional['ApiFile']]]:
206
- return self._files
207
-
208
- @files.setter
209
- def files(self, files: Optional[List[Optional['ApiFile']]]):
210
- if files is None:
211
- del self.files
212
- return
213
- if not isinstance(files, list):
214
- raise TypeError('files must be of type list')
215
- if not all([isinstance(t, ApiFile) for t in files]):
216
- raise TypeError('files must contain only items of type ApiFile')
217
- self._files = files
218
-
219
- @property
220
- def total_children(self) -> int:
221
- return self._total_children
222
-
223
- @total_children.setter
224
- def total_children(self, total_children: int):
225
- if total_children is None:
226
- del self.total_children
227
- return
228
- if not isinstance(total_children, int):
229
- raise TypeError('total_children must be of type int')
230
- self._total_children = total_children
231
-
232
- @property
233
- def total_directories(self) -> int:
234
- return self._total_directories
235
-
236
- @total_directories.setter
237
- def total_directories(self, total_directories: int):
238
- if total_directories is None:
239
- del self.total_directories
240
- return
241
- if not isinstance(total_directories, int):
242
- raise TypeError('total_directories must be of type int')
243
- self._total_directories = total_directories
244
-
245
- @property
246
- def total_files(self) -> int:
247
- return self._total_files
248
-
249
- @total_files.setter
250
- def total_files(self, total_files: int):
251
- if total_files is None:
252
- del self.total_files
253
- return
254
- if not isinstance(total_files, int):
255
- raise TypeError('total_files must be of type int')
256
- self._total_files = total_files
257
-
258
- @property
259
- def next_page_token(self) -> str:
260
- return self._next_page_token
261
-
262
- @next_page_token.setter
263
- def next_page_token(self, next_page_token: str):
264
- if next_page_token is None:
265
- del self.next_page_token
266
- return
267
- if not isinstance(next_page_token, str):
268
- raise TypeError('next_page_token must be of type str')
269
- self._next_page_token = next_page_token
270
-
271
-
272
- class ApiFile(KaggleObject):
273
- r"""
274
- Attributes:
275
- name (str)
276
- creation_date (datetime)
277
- total_bytes (int)
278
- relative_url (str)
279
- description (str)
280
- """
281
-
282
- def __init__(self):
283
- self._name = None
284
- self._creation_date = None
285
- self._total_bytes = 0
286
- self._relative_url = None
287
- self._description = None
288
- self._freeze()
289
-
290
- @property
291
- def name(self) -> str:
292
- return self._name or ""
293
-
294
- @name.setter
295
- def name(self, name: Optional[str]):
296
- if name is None:
297
- del self.name
298
- return
299
- if not isinstance(name, str):
300
- raise TypeError('name must be of type str')
301
- self._name = name
302
-
303
- @property
304
- def creation_date(self) -> datetime:
305
- return self._creation_date
306
-
307
- @creation_date.setter
308
- def creation_date(self, creation_date: datetime):
309
- if creation_date is None:
310
- del self.creation_date
311
- return
312
- if not isinstance(creation_date, datetime):
313
- raise TypeError('creation_date must be of type datetime')
314
- self._creation_date = creation_date
315
-
316
- @property
317
- def total_bytes(self) -> int:
318
- return self._total_bytes
319
-
320
- @total_bytes.setter
321
- def total_bytes(self, total_bytes: int):
322
- if total_bytes is None:
323
- del self.total_bytes
324
- return
325
- if not isinstance(total_bytes, int):
326
- raise TypeError('total_bytes must be of type int')
327
- self._total_bytes = total_bytes
328
-
329
- @property
330
- def relative_url(self) -> str:
331
- return self._relative_url or ""
332
-
333
- @relative_url.setter
334
- def relative_url(self, relative_url: Optional[str]):
335
- if relative_url is None:
336
- del self.relative_url
337
- return
338
- if not isinstance(relative_url, str):
339
- raise TypeError('relative_url must be of type str')
340
- self._relative_url = relative_url
341
-
342
- @property
343
- def description(self) -> str:
344
- return self._description or ""
345
-
346
- @description.setter
347
- def description(self, description: Optional[str]):
348
- if description is None:
349
- del self.description
350
- return
351
- if not isinstance(description, str):
352
- raise TypeError('description must be of type str')
353
- self._description = description
354
-
355
-
356
- class ApiFileExtensionSummaryInfo(KaggleObject):
357
- r"""
358
- Attributes:
359
- extension (str)
360
- file_count (int)
361
- total_size (int)
362
- """
363
-
364
- def __init__(self):
365
- self._extension = ""
366
- self._file_count = 0
367
- self._total_size = 0
368
- self._freeze()
369
-
370
- @property
371
- def extension(self) -> str:
372
- return self._extension
373
-
374
- @extension.setter
375
- def extension(self, extension: str):
376
- if extension is None:
377
- del self.extension
378
- return
379
- if not isinstance(extension, str):
380
- raise TypeError('extension must be of type str')
381
- self._extension = extension
382
-
383
- @property
384
- def file_count(self) -> int:
385
- return self._file_count
386
-
387
- @file_count.setter
388
- def file_count(self, file_count: int):
389
- if file_count is None:
390
- del self.file_count
391
- return
392
- if not isinstance(file_count, int):
393
- raise TypeError('file_count must be of type int')
394
- self._file_count = file_count
395
-
396
- @property
397
- def total_size(self) -> int:
398
- return self._total_size
399
-
400
- @total_size.setter
401
- def total_size(self, total_size: int):
402
- if total_size is None:
403
- del self.total_size
404
- return
405
- if not isinstance(total_size, int):
406
- raise TypeError('total_size must be of type int')
407
- self._total_size = total_size
408
-
409
-
410
- class ApiFilesSummary(KaggleObject):
411
- r"""
412
- Attributes:
413
- file_summary_info (ApiFileSummaryInfo)
414
- column_summary_info (ApiColumnSummaryInfo)
415
- """
416
-
417
- def __init__(self):
418
- self._file_summary_info = None
419
- self._column_summary_info = None
420
- self._freeze()
421
-
422
- @property
423
- def file_summary_info(self) -> Optional['ApiFileSummaryInfo']:
424
- return self._file_summary_info
425
-
426
- @file_summary_info.setter
427
- def file_summary_info(self, file_summary_info: Optional['ApiFileSummaryInfo']):
428
- if file_summary_info is None:
429
- del self.file_summary_info
430
- return
431
- if not isinstance(file_summary_info, ApiFileSummaryInfo):
432
- raise TypeError('file_summary_info must be of type ApiFileSummaryInfo')
433
- self._file_summary_info = file_summary_info
434
-
435
- @property
436
- def column_summary_info(self) -> Optional['ApiColumnSummaryInfo']:
437
- return self._column_summary_info
438
-
439
- @column_summary_info.setter
440
- def column_summary_info(self, column_summary_info: Optional['ApiColumnSummaryInfo']):
441
- if column_summary_info is None:
442
- del self.column_summary_info
443
- return
444
- if not isinstance(column_summary_info, ApiColumnSummaryInfo):
445
- raise TypeError('column_summary_info must be of type ApiColumnSummaryInfo')
446
- self._column_summary_info = column_summary_info
447
-
448
-
449
- class ApiFileSummaryInfo(KaggleObject):
450
- r"""
451
- Attributes:
452
- total_file_count (int)
453
- file_types (ApiFileExtensionSummaryInfo)
454
- """
455
-
456
- def __init__(self):
457
- self._total_file_count = 0
458
- self._file_types = []
459
- self._freeze()
460
-
461
- @property
462
- def total_file_count(self) -> int:
463
- return self._total_file_count
464
-
465
- @total_file_count.setter
466
- def total_file_count(self, total_file_count: int):
467
- if total_file_count is None:
468
- del self.total_file_count
469
- return
470
- if not isinstance(total_file_count, int):
471
- raise TypeError('total_file_count must be of type int')
472
- self._total_file_count = total_file_count
473
-
474
- @property
475
- def file_types(self) -> Optional[List[Optional['ApiFileExtensionSummaryInfo']]]:
476
- return self._file_types
477
-
478
- @file_types.setter
479
- def file_types(self, file_types: Optional[List[Optional['ApiFileExtensionSummaryInfo']]]):
480
- if file_types is None:
481
- del self.file_types
482
- return
483
- if not isinstance(file_types, list):
484
- raise TypeError('file_types must be of type list')
485
- if not all([isinstance(t, ApiFileExtensionSummaryInfo) for t in file_types]):
486
- raise TypeError('file_types must contain only items of type ApiFileExtensionSummaryInfo')
487
- self._file_types = file_types
488
-
489
-
490
- ApiColumnSummaryInfo._fields = [
491
- FieldMetadata("totalColumnCount", "total_column_count", "_total_column_count", int, 0, PredefinedSerializer()),
492
- FieldMetadata("columnTypes", "column_types", "_column_types", ApiColumnTypeSummaryInfo, [], ListSerializer(KaggleObjectSerializer())),
493
- ]
494
-
495
- ApiColumnTypeSummaryInfo._fields = [
496
- FieldMetadata("columnType", "column_type", "_column_type", str, None, PredefinedSerializer(), optional=True),
497
- FieldMetadata("columnCount", "column_count", "_column_count", int, 0, PredefinedSerializer()),
498
- ]
499
-
500
- ApiDirectory._fields = [
501
- FieldMetadata("name", "name", "_name", str, None, PredefinedSerializer(), optional=True),
502
- FieldMetadata("relativeUrl", "relative_url", "_relative_url", str, None, PredefinedSerializer(), optional=True),
503
- FieldMetadata("totalDirectories", "total_directories", "_total_directories", int, 0, PredefinedSerializer()),
504
- FieldMetadata("totalFiles", "total_files", "_total_files", int, 0, PredefinedSerializer()),
505
- FieldMetadata("totalChildren", "total_children", "_total_children", int, 0, PredefinedSerializer()),
506
- ]
507
-
508
- ApiDirectoryContent._fields = [
509
- FieldMetadata("directories", "directories", "_directories", ApiDirectory, [], ListSerializer(KaggleObjectSerializer())),
510
- FieldMetadata("files", "files", "_files", ApiFile, [], ListSerializer(KaggleObjectSerializer())),
511
- FieldMetadata("totalChildren", "total_children", "_total_children", int, 0, PredefinedSerializer()),
512
- FieldMetadata("totalDirectories", "total_directories", "_total_directories", int, 0, PredefinedSerializer()),
513
- FieldMetadata("totalFiles", "total_files", "_total_files", int, 0, PredefinedSerializer()),
514
- FieldMetadata("nextPageToken", "next_page_token", "_next_page_token", str, "", PredefinedSerializer()),
515
- ]
516
-
517
- ApiFile._fields = [
518
- FieldMetadata("name", "name", "_name", str, None, PredefinedSerializer(), optional=True),
519
- FieldMetadata("creationDate", "creation_date", "_creation_date", datetime, None, DateTimeSerializer()),
520
- FieldMetadata("totalBytes", "total_bytes", "_total_bytes", int, 0, PredefinedSerializer()),
521
- FieldMetadata("relativeUrl", "relative_url", "_relative_url", str, None, PredefinedSerializer(), optional=True),
522
- FieldMetadata("description", "description", "_description", str, None, PredefinedSerializer(), optional=True),
523
- ]
524
-
525
- ApiFileExtensionSummaryInfo._fields = [
526
- FieldMetadata("extension", "extension", "_extension", str, "", PredefinedSerializer()),
527
- FieldMetadata("fileCount", "file_count", "_file_count", int, 0, PredefinedSerializer()),
528
- FieldMetadata("totalSize", "total_size", "_total_size", int, 0, PredefinedSerializer()),
529
- ]
530
-
531
- ApiFilesSummary._fields = [
532
- FieldMetadata("fileSummaryInfo", "file_summary_info", "_file_summary_info", ApiFileSummaryInfo, None, KaggleObjectSerializer()),
533
- FieldMetadata("columnSummaryInfo", "column_summary_info", "_column_summary_info", ApiColumnSummaryInfo, None, KaggleObjectSerializer()),
534
- ]
535
-
536
- ApiFileSummaryInfo._fields = [
537
- FieldMetadata("totalFileCount", "total_file_count", "_total_file_count", int, 0, PredefinedSerializer()),
538
- FieldMetadata("fileTypes", "file_types", "_file_types", ApiFileExtensionSummaryInfo, [], ListSerializer(KaggleObjectSerializer())),
539
- ]
540
-
File without changes