kaggle 1.6.11__tar.gz → 1.6.14__tar.gz
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.
- {kaggle-1.6.11/kaggle.egg-info → kaggle-1.6.14}/PKG-INFO +1 -1
- {kaggle-1.6.11 → kaggle-1.6.14}/README.md +19 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/api/kaggle_api.py +393 -6
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/api/kaggle_api_extended.py +268 -16
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/cli.py +118 -4
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/kaggle_models_extended.py +5 -0
- {kaggle-1.6.11 → kaggle-1.6.14/kaggle.egg-info}/PKG-INFO +1 -1
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle.egg-info/SOURCES.txt +1 -7
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle.egg-info/top_level.txt +0 -1
- {kaggle-1.6.11/src → kaggle-1.6.14}/setup.py +2 -2
- kaggle-1.6.11/setup.py +0 -36
- kaggle-1.6.11/src/__init__.py +0 -1
- kaggle-1.6.11/src/kaggle/__init__.py +0 -7
- kaggle-1.6.11/src/kaggle/cli.py +0 -1583
- kaggle-1.6.11/src/kaggle/test/__init__.py +0 -0
- kaggle-1.6.11/src/kaggle/test/test_authenticate.py +0 -43
- {kaggle-1.6.11 → kaggle-1.6.14}/LICENSE +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/MANIFEST.in +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/__init__.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/api/__init__.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/api_client.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/configuration.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/__init__.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/api_blob_type.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/collaborator.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/create_inbox_file_request.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/dataset_column.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/dataset_new_request.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/dataset_new_version_request.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/dataset_update_settings_request.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/error.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/kernel_push_request.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/license.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/model_instance_new_version_request.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/model_instance_update_request.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/model_new_instance_request.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/model_new_request.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/model_update_request.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/result.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/start_blob_upload_request.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/start_blob_upload_response.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/models/upload_file.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/rest.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/test/__init__.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle/test/test_authenticate.py +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle.egg-info/dependency_links.txt +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle.egg-info/entry_points.txt +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/kaggle.egg-info/requires.txt +0 -0
- {kaggle-1.6.11 → kaggle-1.6.14}/setup.cfg +0 -0
|
@@ -16,12 +16,31 @@ pip install kaggle
|
|
|
16
16
|
|
|
17
17
|
## Development
|
|
18
18
|
|
|
19
|
+
### Kaggle Internal
|
|
20
|
+
|
|
21
|
+
Obviously, this depends on Kaggle services. When you're extending the API and modifying
|
|
22
|
+
or adding to those services, you should be working in your Kaggle mid-tier development
|
|
23
|
+
environment. You'll run Kaggle locally, in the container, and test the Python code by
|
|
24
|
+
running it in the container so it can connect to your local testing environment.
|
|
25
|
+
However, do not try to create a release from within the container. The code formatter
|
|
26
|
+
(`yapf3`) changes much more than intended.
|
|
27
|
+
|
|
28
|
+
Also, run the following command to get `autogen.sh` installed:
|
|
29
|
+
```bash
|
|
30
|
+
rm -rf /tmp/autogen && mkdir -p /tmp/autogen && unzip -qo /tmp/autogen.zip -d /tmp/autogen &&
|
|
31
|
+
mv /tmp/autogen/autogen-*/* /tmp/autogen && rm -rf /tmp/autogen/autogen-* &&
|
|
32
|
+
sudo chmod a+rx /tmp/autogen/autogen.sh
|
|
33
|
+
```
|
|
34
|
+
|
|
19
35
|
### Prerequisites
|
|
20
36
|
|
|
21
37
|
We use [hatch](https://hatch.pypa.io) to manage this project.
|
|
22
38
|
|
|
23
39
|
Follow these [instructions](https://hatch.pypa.io/latest/install/) to install it.
|
|
24
40
|
|
|
41
|
+
If you are working in a managed environment, you may want to use `pipx`. If it isn't already installed
|
|
42
|
+
try `sudo apt install pipx`. Then you should be able to proceed with `pipx install hatch`.
|
|
43
|
+
|
|
25
44
|
### Dependencies
|
|
26
45
|
|
|
27
46
|
```sh
|
|
@@ -407,6 +407,8 @@ class KaggleApi(object):
|
|
|
407
407
|
|
|
408
408
|
:param async_req bool
|
|
409
409
|
:param str id: Competition name (required)
|
|
410
|
+
:param str page_token: Page token for pagination
|
|
411
|
+
:param int page_size: Number of items per page (default 20)
|
|
410
412
|
:return: Result
|
|
411
413
|
If the method is called asynchronously,
|
|
412
414
|
returns the request thread.
|
|
@@ -428,12 +430,14 @@ class KaggleApi(object):
|
|
|
428
430
|
|
|
429
431
|
:param async_req bool
|
|
430
432
|
:param str id: Competition name (required)
|
|
433
|
+
:param str page_token: Page token for pagination
|
|
434
|
+
:param int page_size: Number of items per page (default 20)
|
|
431
435
|
:return: Result
|
|
432
436
|
If the method is called asynchronously,
|
|
433
437
|
returns the request thread.
|
|
434
438
|
"""
|
|
435
439
|
|
|
436
|
-
all_params = ['id'] # noqa: E501
|
|
440
|
+
all_params = ['id', 'page_token', 'page_size'] # noqa: E501
|
|
437
441
|
all_params.append('async_req')
|
|
438
442
|
all_params.append('_return_http_data_only')
|
|
439
443
|
all_params.append('_preload_content')
|
|
@@ -460,6 +464,10 @@ class KaggleApi(object):
|
|
|
460
464
|
path_params['id'] = params['id'] # noqa: E501
|
|
461
465
|
|
|
462
466
|
query_params = []
|
|
467
|
+
if 'page_token' in params:
|
|
468
|
+
query_params.append(('pageToken', params['page_token'])) # noqa: E501
|
|
469
|
+
if 'page_size' in params:
|
|
470
|
+
query_params.append(('pageSize', params['page_size'])) # noqa: E501
|
|
463
471
|
|
|
464
472
|
header_params = {}
|
|
465
473
|
|
|
@@ -1814,6 +1822,8 @@ class KaggleApi(object):
|
|
|
1814
1822
|
:param str owner_slug: Dataset owner (required)
|
|
1815
1823
|
:param str dataset_slug: Dataset name (required)
|
|
1816
1824
|
:param str dataset_version_number: Dataset version number
|
|
1825
|
+
:param str page_token: Page token for pagination
|
|
1826
|
+
:param int page_size: Number of items per page (default 20)
|
|
1817
1827
|
:return: Result
|
|
1818
1828
|
If the method is called asynchronously,
|
|
1819
1829
|
returns the request thread.
|
|
@@ -1837,12 +1847,14 @@ class KaggleApi(object):
|
|
|
1837
1847
|
:param str owner_slug: Dataset owner (required)
|
|
1838
1848
|
:param str dataset_slug: Dataset name (required)
|
|
1839
1849
|
:param str dataset_version_number: Dataset version number
|
|
1850
|
+
:param str page_token: Page token for pagination
|
|
1851
|
+
:param int page_size: Number of items per page (default 20)
|
|
1840
1852
|
:return: Result
|
|
1841
1853
|
If the method is called asynchronously,
|
|
1842
1854
|
returns the request thread.
|
|
1843
1855
|
"""
|
|
1844
1856
|
|
|
1845
|
-
all_params = ['owner_slug', 'dataset_slug', 'dataset_version_number'] # noqa: E501
|
|
1857
|
+
all_params = ['owner_slug', 'dataset_slug', 'dataset_version_number', 'page_token', 'page_size'] # noqa: E501
|
|
1846
1858
|
all_params.append('async_req')
|
|
1847
1859
|
all_params.append('_return_http_data_only')
|
|
1848
1860
|
all_params.append('_preload_content')
|
|
@@ -1877,6 +1889,10 @@ class KaggleApi(object):
|
|
|
1877
1889
|
query_params = []
|
|
1878
1890
|
if 'dataset_version_number' in params:
|
|
1879
1891
|
query_params.append(('datasetVersionNumber', params['dataset_version_number'])) # noqa: E501
|
|
1892
|
+
if 'page_token' in params:
|
|
1893
|
+
query_params.append(('pageToken', params['page_token'])) # noqa: E501
|
|
1894
|
+
if 'page_size' in params:
|
|
1895
|
+
query_params.append(('pageSize', params['page_size'])) # noqa: E501
|
|
1880
1896
|
|
|
1881
1897
|
header_params = {}
|
|
1882
1898
|
|
|
@@ -2995,7 +3011,7 @@ class KaggleApi(object):
|
|
|
2995
3011
|
|
|
2996
3012
|
:param async_req bool
|
|
2997
3013
|
:param int page: Page number
|
|
2998
|
-
:param int page_size:
|
|
3014
|
+
:param int page_size: Number of items per page (default 20)
|
|
2999
3015
|
:param str search: Search terms
|
|
3000
3016
|
:param str group: Display only your kernels
|
|
3001
3017
|
:param str user: Display kernels by a particular group
|
|
@@ -3027,7 +3043,7 @@ class KaggleApi(object):
|
|
|
3027
3043
|
|
|
3028
3044
|
:param async_req bool
|
|
3029
3045
|
:param int page: Page number
|
|
3030
|
-
:param int page_size:
|
|
3046
|
+
:param int page_size: Number of items per page (default 20)
|
|
3031
3047
|
:param str search: Search terms
|
|
3032
3048
|
:param str group: Display only your kernels
|
|
3033
3049
|
:param str user: Display kernels by a particular group
|
|
@@ -3118,6 +3134,119 @@ class KaggleApi(object):
|
|
|
3118
3134
|
_request_timeout=params.get('_request_timeout'),
|
|
3119
3135
|
collection_formats=collection_formats)
|
|
3120
3136
|
|
|
3137
|
+
def kernels_list_files(self, user_name, kernel_slug, **kwargs): # noqa: E501
|
|
3138
|
+
"""List kernel files # noqa: E501
|
|
3139
|
+
|
|
3140
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
3141
|
+
asynchronous HTTP request, please pass async_req=True
|
|
3142
|
+
>>> thread = api.kernels_list_files(user_name, kernel_slug, async_req=True)
|
|
3143
|
+
>>> result = thread.get()
|
|
3144
|
+
|
|
3145
|
+
:param async_req bool
|
|
3146
|
+
:param str user_name: Kernel owner (required)
|
|
3147
|
+
:param str kernel_slug: Kernel name (required)
|
|
3148
|
+
:param str kernel_version_number: Kernel version number
|
|
3149
|
+
:param int page_size: Number of items per page (default 20)
|
|
3150
|
+
:param str page_token: Page token for pagination
|
|
3151
|
+
:return: Result
|
|
3152
|
+
If the method is called asynchronously,
|
|
3153
|
+
returns the request thread.
|
|
3154
|
+
"""
|
|
3155
|
+
kwargs['_return_http_data_only'] = True
|
|
3156
|
+
if kwargs.get('async_req'):
|
|
3157
|
+
return self.kernels_list_files_with_http_info(user_name, kernel_slug, **kwargs) # noqa: E501
|
|
3158
|
+
else:
|
|
3159
|
+
(data) = self.kernels_list_files_with_http_info(user_name, kernel_slug, **kwargs) # noqa: E501
|
|
3160
|
+
return data
|
|
3161
|
+
|
|
3162
|
+
def kernels_list_files_with_http_info(self, user_name, kernel_slug, **kwargs): # noqa: E501
|
|
3163
|
+
"""List kernel files # noqa: E501
|
|
3164
|
+
|
|
3165
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
3166
|
+
asynchronous HTTP request, please pass async_req=True
|
|
3167
|
+
>>> thread = api.kernels_list_files_with_http_info(user_name, kernel_slug, async_req=True)
|
|
3168
|
+
>>> result = thread.get()
|
|
3169
|
+
|
|
3170
|
+
:param async_req bool
|
|
3171
|
+
:param str user_name: Kernel owner (required)
|
|
3172
|
+
:param str kernel_slug: Kernel name (required)
|
|
3173
|
+
:param str kernel_version_number: Kernel version number
|
|
3174
|
+
:param int page_size: Number of items per page (default 20)
|
|
3175
|
+
:param str page_token: Page token for pagination
|
|
3176
|
+
:return: Result
|
|
3177
|
+
If the method is called asynchronously,
|
|
3178
|
+
returns the request thread.
|
|
3179
|
+
"""
|
|
3180
|
+
|
|
3181
|
+
all_params = ['user_name', 'kernel_slug', 'kernel_version_number', 'page_size', 'page_token'] # noqa: E501
|
|
3182
|
+
all_params.append('async_req')
|
|
3183
|
+
all_params.append('_return_http_data_only')
|
|
3184
|
+
all_params.append('_preload_content')
|
|
3185
|
+
all_params.append('_request_timeout')
|
|
3186
|
+
|
|
3187
|
+
params = locals()
|
|
3188
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
3189
|
+
if key not in all_params:
|
|
3190
|
+
raise TypeError(
|
|
3191
|
+
"Got an unexpected keyword argument '%s'"
|
|
3192
|
+
" to method kernels_list_files" % key
|
|
3193
|
+
)
|
|
3194
|
+
params[key] = val
|
|
3195
|
+
del params['kwargs']
|
|
3196
|
+
# verify the required parameter 'user_name' is set
|
|
3197
|
+
if ('user_name' not in params or
|
|
3198
|
+
params['user_name'] is None):
|
|
3199
|
+
raise ValueError("Missing the required parameter `user_name` when calling `kernels_list_files`") # noqa: E501
|
|
3200
|
+
# verify the required parameter 'kernel_slug' is set
|
|
3201
|
+
if ('kernel_slug' not in params or
|
|
3202
|
+
params['kernel_slug'] is None):
|
|
3203
|
+
raise ValueError("Missing the required parameter `kernel_slug` when calling `kernels_list_files`") # noqa: E501
|
|
3204
|
+
|
|
3205
|
+
collection_formats = {}
|
|
3206
|
+
|
|
3207
|
+
path_params = {}
|
|
3208
|
+
|
|
3209
|
+
query_params = []
|
|
3210
|
+
if 'user_name' in params:
|
|
3211
|
+
query_params.append(('userName', params['user_name'])) # noqa: E501
|
|
3212
|
+
if 'kernel_slug' in params:
|
|
3213
|
+
query_params.append(('kernelSlug', params['kernel_slug'])) # noqa: E501
|
|
3214
|
+
if 'kernel_version_number' in params:
|
|
3215
|
+
query_params.append(('kernelVersionNumber', params['kernel_version_number'])) # noqa: E501
|
|
3216
|
+
if 'page_size' in params:
|
|
3217
|
+
query_params.append(('pageSize', params['page_size'])) # noqa: E501
|
|
3218
|
+
if 'page_token' in params:
|
|
3219
|
+
query_params.append(('pageToken', params['page_token'])) # noqa: E501
|
|
3220
|
+
|
|
3221
|
+
header_params = {}
|
|
3222
|
+
|
|
3223
|
+
form_params = []
|
|
3224
|
+
local_var_files = {}
|
|
3225
|
+
|
|
3226
|
+
body_params = None
|
|
3227
|
+
# HTTP header `Accept`
|
|
3228
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
3229
|
+
['application/json']) # noqa: E501
|
|
3230
|
+
|
|
3231
|
+
# Authentication setting
|
|
3232
|
+
auth_settings = ['basicAuth'] # noqa: E501
|
|
3233
|
+
|
|
3234
|
+
return self.api_client.call_api(
|
|
3235
|
+
'/kernels/files', 'GET',
|
|
3236
|
+
path_params,
|
|
3237
|
+
query_params,
|
|
3238
|
+
header_params,
|
|
3239
|
+
body=body_params,
|
|
3240
|
+
post_params=form_params,
|
|
3241
|
+
files=local_var_files,
|
|
3242
|
+
response_type='Result', # noqa: E501
|
|
3243
|
+
auth_settings=auth_settings,
|
|
3244
|
+
async_req=params.get('async_req'),
|
|
3245
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
3246
|
+
_preload_content=params.get('_preload_content', True),
|
|
3247
|
+
_request_timeout=params.get('_request_timeout'),
|
|
3248
|
+
collection_formats=collection_formats)
|
|
3249
|
+
|
|
3121
3250
|
def metadata_get(self, owner_slug, dataset_slug, **kwargs): # noqa: E501
|
|
3122
3251
|
"""Get the metadata for a dataset # noqa: E501
|
|
3123
3252
|
|
|
@@ -3332,6 +3461,264 @@ class KaggleApi(object):
|
|
|
3332
3461
|
_request_timeout=params.get('_request_timeout'),
|
|
3333
3462
|
collection_formats=collection_formats)
|
|
3334
3463
|
|
|
3464
|
+
def model_instance_files(self, owner_slug, model_slug, framework, instance_slug, **kwargs): # noqa: E501
|
|
3465
|
+
"""List model instance files for the current version # noqa: E501
|
|
3466
|
+
|
|
3467
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
3468
|
+
asynchronous HTTP request, please pass async_req=True
|
|
3469
|
+
>>> thread = api.model_instance_files(owner_slug, model_slug, framework, instance_slug, async_req=True)
|
|
3470
|
+
>>> result = thread.get()
|
|
3471
|
+
|
|
3472
|
+
:param async_req bool
|
|
3473
|
+
:param str owner_slug: Model owner (required)
|
|
3474
|
+
:param str model_slug: Model name (required)
|
|
3475
|
+
:param str framework: Model instance framework (required)
|
|
3476
|
+
:param str instance_slug: Model instance slug (required)
|
|
3477
|
+
:param int page_size: Number of items per page (default 20)
|
|
3478
|
+
:param str page_token: Page token for pagination
|
|
3479
|
+
:return: Result
|
|
3480
|
+
If the method is called asynchronously,
|
|
3481
|
+
returns the request thread.
|
|
3482
|
+
"""
|
|
3483
|
+
kwargs['_return_http_data_only'] = True
|
|
3484
|
+
if kwargs.get('async_req'):
|
|
3485
|
+
return self.model_instance_files_with_http_info(owner_slug, model_slug, framework, instance_slug, **kwargs) # noqa: E501
|
|
3486
|
+
else:
|
|
3487
|
+
(data) = self.model_instance_files_with_http_info(owner_slug, model_slug, framework, instance_slug, **kwargs) # noqa: E501
|
|
3488
|
+
return data
|
|
3489
|
+
|
|
3490
|
+
def model_instance_files_with_http_info(self, owner_slug, model_slug, framework, instance_slug, **kwargs): # noqa: E501
|
|
3491
|
+
"""List model instance files for the current version # noqa: E501
|
|
3492
|
+
|
|
3493
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
3494
|
+
asynchronous HTTP request, please pass async_req=True
|
|
3495
|
+
>>> thread = api.model_instance_files_with_http_info(owner_slug, model_slug, framework, instance_slug, async_req=True)
|
|
3496
|
+
>>> result = thread.get()
|
|
3497
|
+
|
|
3498
|
+
:param async_req bool
|
|
3499
|
+
:param str owner_slug: Model owner (required)
|
|
3500
|
+
:param str model_slug: Model name (required)
|
|
3501
|
+
:param str framework: Model instance framework (required)
|
|
3502
|
+
:param str instance_slug: Model instance slug (required)
|
|
3503
|
+
:param int page_size: Number of items per page (default 20)
|
|
3504
|
+
:param str page_token: Page token for pagination
|
|
3505
|
+
:return: Result
|
|
3506
|
+
If the method is called asynchronously,
|
|
3507
|
+
returns the request thread.
|
|
3508
|
+
"""
|
|
3509
|
+
|
|
3510
|
+
all_params = ['owner_slug', 'model_slug', 'framework', 'instance_slug', 'page_size', 'page_token'] # noqa: E501
|
|
3511
|
+
all_params.append('async_req')
|
|
3512
|
+
all_params.append('_return_http_data_only')
|
|
3513
|
+
all_params.append('_preload_content')
|
|
3514
|
+
all_params.append('_request_timeout')
|
|
3515
|
+
|
|
3516
|
+
params = locals()
|
|
3517
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
3518
|
+
if key not in all_params:
|
|
3519
|
+
raise TypeError(
|
|
3520
|
+
"Got an unexpected keyword argument '%s'"
|
|
3521
|
+
" to method model_instance_files" % key
|
|
3522
|
+
)
|
|
3523
|
+
params[key] = val
|
|
3524
|
+
del params['kwargs']
|
|
3525
|
+
# verify the required parameter 'owner_slug' is set
|
|
3526
|
+
if ('owner_slug' not in params or
|
|
3527
|
+
params['owner_slug'] is None):
|
|
3528
|
+
raise ValueError("Missing the required parameter `owner_slug` when calling `model_instance_files`") # noqa: E501
|
|
3529
|
+
# verify the required parameter 'model_slug' is set
|
|
3530
|
+
if ('model_slug' not in params or
|
|
3531
|
+
params['model_slug'] is None):
|
|
3532
|
+
raise ValueError("Missing the required parameter `model_slug` when calling `model_instance_files`") # noqa: E501
|
|
3533
|
+
# verify the required parameter 'framework' is set
|
|
3534
|
+
if ('framework' not in params or
|
|
3535
|
+
params['framework'] is None):
|
|
3536
|
+
raise ValueError("Missing the required parameter `framework` when calling `model_instance_files`") # noqa: E501
|
|
3537
|
+
# verify the required parameter 'instance_slug' is set
|
|
3538
|
+
if ('instance_slug' not in params or
|
|
3539
|
+
params['instance_slug'] is None):
|
|
3540
|
+
raise ValueError("Missing the required parameter `instance_slug` when calling `model_instance_files`") # noqa: E501
|
|
3541
|
+
|
|
3542
|
+
collection_formats = {}
|
|
3543
|
+
|
|
3544
|
+
path_params = {}
|
|
3545
|
+
if 'owner_slug' in params:
|
|
3546
|
+
path_params['ownerSlug'] = params['owner_slug'] # noqa: E501
|
|
3547
|
+
if 'model_slug' in params:
|
|
3548
|
+
path_params['modelSlug'] = params['model_slug'] # noqa: E501
|
|
3549
|
+
if 'framework' in params:
|
|
3550
|
+
path_params['framework'] = params['framework'] # noqa: E501
|
|
3551
|
+
if 'instance_slug' in params:
|
|
3552
|
+
path_params['instanceSlug'] = params['instance_slug'] # noqa: E501
|
|
3553
|
+
|
|
3554
|
+
query_params = []
|
|
3555
|
+
if 'page_size' in params:
|
|
3556
|
+
query_params.append(('pageSize', params['page_size'])) # noqa: E501
|
|
3557
|
+
if 'page_token' in params:
|
|
3558
|
+
query_params.append(('pageToken', params['page_token'])) # noqa: E501
|
|
3559
|
+
|
|
3560
|
+
header_params = {}
|
|
3561
|
+
|
|
3562
|
+
form_params = []
|
|
3563
|
+
local_var_files = {}
|
|
3564
|
+
|
|
3565
|
+
body_params = None
|
|
3566
|
+
# HTTP header `Accept`
|
|
3567
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
3568
|
+
['application/json']) # noqa: E501
|
|
3569
|
+
|
|
3570
|
+
# Authentication setting
|
|
3571
|
+
auth_settings = ['basicAuth'] # noqa: E501
|
|
3572
|
+
|
|
3573
|
+
return self.api_client.call_api(
|
|
3574
|
+
'/models/{ownerSlug}/{modelSlug}/{framework}/{instanceSlug}/files', 'GET',
|
|
3575
|
+
path_params,
|
|
3576
|
+
query_params,
|
|
3577
|
+
header_params,
|
|
3578
|
+
body=body_params,
|
|
3579
|
+
post_params=form_params,
|
|
3580
|
+
files=local_var_files,
|
|
3581
|
+
response_type='Result', # noqa: E501
|
|
3582
|
+
auth_settings=auth_settings,
|
|
3583
|
+
async_req=params.get('async_req'),
|
|
3584
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
3585
|
+
_preload_content=params.get('_preload_content', True),
|
|
3586
|
+
_request_timeout=params.get('_request_timeout'),
|
|
3587
|
+
collection_formats=collection_formats)
|
|
3588
|
+
|
|
3589
|
+
def model_instance_version_files(self, owner_slug, model_slug, framework, instance_slug, version_number, **kwargs): # noqa: E501
|
|
3590
|
+
"""List model instance version files # noqa: E501
|
|
3591
|
+
|
|
3592
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
3593
|
+
asynchronous HTTP request, please pass async_req=True
|
|
3594
|
+
>>> thread = api.model_instance_version_files(owner_slug, model_slug, framework, instance_slug, version_number, async_req=True)
|
|
3595
|
+
>>> result = thread.get()
|
|
3596
|
+
|
|
3597
|
+
:param async_req bool
|
|
3598
|
+
:param str owner_slug: Model owner (required)
|
|
3599
|
+
:param str model_slug: Model name (required)
|
|
3600
|
+
:param str framework: Model instance framework (required)
|
|
3601
|
+
:param str instance_slug: Model instance slug (required)
|
|
3602
|
+
:param str version_number: Model instance version number (required)
|
|
3603
|
+
:param int page_size: Number of items per page (default 20)
|
|
3604
|
+
:param str page_token: Page token for pagination
|
|
3605
|
+
:return: Result
|
|
3606
|
+
If the method is called asynchronously,
|
|
3607
|
+
returns the request thread.
|
|
3608
|
+
"""
|
|
3609
|
+
kwargs['_return_http_data_only'] = True
|
|
3610
|
+
if kwargs.get('async_req'):
|
|
3611
|
+
return self.model_instance_version_files_with_http_info(owner_slug, model_slug, framework, instance_slug, version_number, **kwargs) # noqa: E501
|
|
3612
|
+
else:
|
|
3613
|
+
(data) = self.model_instance_version_files_with_http_info(owner_slug, model_slug, framework, instance_slug, version_number, **kwargs) # noqa: E501
|
|
3614
|
+
return data
|
|
3615
|
+
|
|
3616
|
+
def model_instance_version_files_with_http_info(self, owner_slug, model_slug, framework, instance_slug, version_number, **kwargs): # noqa: E501
|
|
3617
|
+
"""List model instance version files # noqa: E501
|
|
3618
|
+
|
|
3619
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
3620
|
+
asynchronous HTTP request, please pass async_req=True
|
|
3621
|
+
>>> thread = api.model_instance_version_files_with_http_info(owner_slug, model_slug, framework, instance_slug, version_number, async_req=True)
|
|
3622
|
+
>>> result = thread.get()
|
|
3623
|
+
|
|
3624
|
+
:param async_req bool
|
|
3625
|
+
:param str owner_slug: Model owner (required)
|
|
3626
|
+
:param str model_slug: Model name (required)
|
|
3627
|
+
:param str framework: Model instance framework (required)
|
|
3628
|
+
:param str instance_slug: Model instance slug (required)
|
|
3629
|
+
:param str version_number: Model instance version number (required)
|
|
3630
|
+
:param int page_size: Number of items per page (default 20)
|
|
3631
|
+
:param str page_token: Page token for pagination
|
|
3632
|
+
:return: Result
|
|
3633
|
+
If the method is called asynchronously,
|
|
3634
|
+
returns the request thread.
|
|
3635
|
+
"""
|
|
3636
|
+
|
|
3637
|
+
all_params = ['owner_slug', 'model_slug', 'framework', 'instance_slug', 'version_number', 'page_size', 'page_token'] # noqa: E501
|
|
3638
|
+
all_params.append('async_req')
|
|
3639
|
+
all_params.append('_return_http_data_only')
|
|
3640
|
+
all_params.append('_preload_content')
|
|
3641
|
+
all_params.append('_request_timeout')
|
|
3642
|
+
|
|
3643
|
+
params = locals()
|
|
3644
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
3645
|
+
if key not in all_params:
|
|
3646
|
+
raise TypeError(
|
|
3647
|
+
"Got an unexpected keyword argument '%s'"
|
|
3648
|
+
" to method model_instance_version_files" % key
|
|
3649
|
+
)
|
|
3650
|
+
params[key] = val
|
|
3651
|
+
del params['kwargs']
|
|
3652
|
+
# verify the required parameter 'owner_slug' is set
|
|
3653
|
+
if ('owner_slug' not in params or
|
|
3654
|
+
params['owner_slug'] is None):
|
|
3655
|
+
raise ValueError("Missing the required parameter `owner_slug` when calling `model_instance_version_files`") # noqa: E501
|
|
3656
|
+
# verify the required parameter 'model_slug' is set
|
|
3657
|
+
if ('model_slug' not in params or
|
|
3658
|
+
params['model_slug'] is None):
|
|
3659
|
+
raise ValueError("Missing the required parameter `model_slug` when calling `model_instance_version_files`") # noqa: E501
|
|
3660
|
+
# verify the required parameter 'framework' is set
|
|
3661
|
+
if ('framework' not in params or
|
|
3662
|
+
params['framework'] is None):
|
|
3663
|
+
raise ValueError("Missing the required parameter `framework` when calling `model_instance_version_files`") # noqa: E501
|
|
3664
|
+
# verify the required parameter 'instance_slug' is set
|
|
3665
|
+
if ('instance_slug' not in params or
|
|
3666
|
+
params['instance_slug'] is None):
|
|
3667
|
+
raise ValueError("Missing the required parameter `instance_slug` when calling `model_instance_version_files`") # noqa: E501
|
|
3668
|
+
# verify the required parameter 'version_number' is set
|
|
3669
|
+
if ('version_number' not in params or
|
|
3670
|
+
params['version_number'] is None):
|
|
3671
|
+
raise ValueError("Missing the required parameter `version_number` when calling `model_instance_version_files`") # noqa: E501
|
|
3672
|
+
|
|
3673
|
+
collection_formats = {}
|
|
3674
|
+
|
|
3675
|
+
path_params = {}
|
|
3676
|
+
if 'owner_slug' in params:
|
|
3677
|
+
path_params['ownerSlug'] = params['owner_slug'] # noqa: E501
|
|
3678
|
+
if 'model_slug' in params:
|
|
3679
|
+
path_params['modelSlug'] = params['model_slug'] # noqa: E501
|
|
3680
|
+
if 'framework' in params:
|
|
3681
|
+
path_params['framework'] = params['framework'] # noqa: E501
|
|
3682
|
+
if 'instance_slug' in params:
|
|
3683
|
+
path_params['instanceSlug'] = params['instance_slug'] # noqa: E501
|
|
3684
|
+
if 'version_number' in params:
|
|
3685
|
+
path_params['versionNumber'] = params['version_number'] # noqa: E501
|
|
3686
|
+
|
|
3687
|
+
query_params = []
|
|
3688
|
+
if 'page_size' in params:
|
|
3689
|
+
query_params.append(('pageSize', params['page_size'])) # noqa: E501
|
|
3690
|
+
if 'page_token' in params:
|
|
3691
|
+
query_params.append(('pageToken', params['page_token'])) # noqa: E501
|
|
3692
|
+
|
|
3693
|
+
header_params = {}
|
|
3694
|
+
|
|
3695
|
+
form_params = []
|
|
3696
|
+
local_var_files = {}
|
|
3697
|
+
|
|
3698
|
+
body_params = None
|
|
3699
|
+
# HTTP header `Accept`
|
|
3700
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
3701
|
+
['application/json']) # noqa: E501
|
|
3702
|
+
|
|
3703
|
+
# Authentication setting
|
|
3704
|
+
auth_settings = ['basicAuth'] # noqa: E501
|
|
3705
|
+
|
|
3706
|
+
return self.api_client.call_api(
|
|
3707
|
+
'/models/{ownerSlug}/{modelSlug}/{framework}/{instanceSlug}/{versionNumber}/files', 'GET',
|
|
3708
|
+
path_params,
|
|
3709
|
+
query_params,
|
|
3710
|
+
header_params,
|
|
3711
|
+
body=body_params,
|
|
3712
|
+
post_params=form_params,
|
|
3713
|
+
files=local_var_files,
|
|
3714
|
+
response_type='Result', # noqa: E501
|
|
3715
|
+
auth_settings=auth_settings,
|
|
3716
|
+
async_req=params.get('async_req'),
|
|
3717
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
3718
|
+
_preload_content=params.get('_preload_content', True),
|
|
3719
|
+
_request_timeout=params.get('_request_timeout'),
|
|
3720
|
+
collection_formats=collection_formats)
|
|
3721
|
+
|
|
3335
3722
|
def model_instance_versions_download(self, owner_slug, model_slug, framework, instance_slug, version_number, **kwargs): # noqa: E501
|
|
3336
3723
|
"""Download model instance version files # noqa: E501
|
|
3337
3724
|
|
|
@@ -3808,7 +4195,7 @@ class KaggleApi(object):
|
|
|
3808
4195
|
:param str search: Search terms
|
|
3809
4196
|
:param str sort_by: Sort the results
|
|
3810
4197
|
:param str owner: Display models by a specific user or organization
|
|
3811
|
-
:param int page_size:
|
|
4198
|
+
:param int page_size: Number of items per page (default 20)
|
|
3812
4199
|
:param str page_token: Page token for pagination
|
|
3813
4200
|
:return: Result
|
|
3814
4201
|
If the method is called asynchronously,
|
|
@@ -3833,7 +4220,7 @@ class KaggleApi(object):
|
|
|
3833
4220
|
:param str search: Search terms
|
|
3834
4221
|
:param str sort_by: Sort the results
|
|
3835
4222
|
:param str owner: Display models by a specific user or organization
|
|
3836
|
-
:param int page_size:
|
|
4223
|
+
:param int page_size: Number of items per page (default 20)
|
|
3837
4224
|
:param str page_token: Page token for pagination
|
|
3838
4225
|
:return: Result
|
|
3839
4226
|
If the method is called asynchronously,
|