files-com 1.5.0__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.

Potentially problematic release.


This version of files-com might be problematic. Click here for more details.

Files changed (113) hide show
  1. README.md +682 -0
  2. _VERSION +1 -0
  3. files_com-1.5.0.dist-info/METADATA +694 -0
  4. files_com-1.5.0.dist-info/RECORD +113 -0
  5. files_com-1.5.0.dist-info/WHEEL +5 -0
  6. files_com-1.5.0.dist-info/licenses/LICENSE +21 -0
  7. files_com-1.5.0.dist-info/top_level.txt +1 -0
  8. files_sdk/__init__.py +270 -0
  9. files_sdk/api.py +57 -0
  10. files_sdk/api_client.py +327 -0
  11. files_sdk/error.py +2891 -0
  12. files_sdk/list_obj.py +42 -0
  13. files_sdk/models/__init__.py +104 -0
  14. files_sdk/models/account_line_item.py +51 -0
  15. files_sdk/models/action.py +49 -0
  16. files_sdk/models/action_notification_export.py +147 -0
  17. files_sdk/models/action_notification_export_result.py +88 -0
  18. files_sdk/models/api_key.py +322 -0
  19. files_sdk/models/api_request_log.py +87 -0
  20. files_sdk/models/app.py +89 -0
  21. files_sdk/models/as2_incoming_message.py +123 -0
  22. files_sdk/models/as2_outgoing_message.py +119 -0
  23. files_sdk/models/as2_partner.py +374 -0
  24. files_sdk/models/as2_station.py +271 -0
  25. files_sdk/models/auto.py +36 -0
  26. files_sdk/models/automation.py +691 -0
  27. files_sdk/models/automation_log.py +77 -0
  28. files_sdk/models/automation_run.py +108 -0
  29. files_sdk/models/bandwidth_snapshot.py +91 -0
  30. files_sdk/models/behavior.py +334 -0
  31. files_sdk/models/bundle.py +550 -0
  32. files_sdk/models/bundle_action.py +86 -0
  33. files_sdk/models/bundle_download.py +94 -0
  34. files_sdk/models/bundle_notification.py +217 -0
  35. files_sdk/models/bundle_path.py +37 -0
  36. files_sdk/models/bundle_recipient.py +120 -0
  37. files_sdk/models/bundle_registration.py +79 -0
  38. files_sdk/models/clickwrap.py +268 -0
  39. files_sdk/models/dns_record.py +59 -0
  40. files_sdk/models/email_incoming_message.py +102 -0
  41. files_sdk/models/email_log.py +74 -0
  42. files_sdk/models/errors.py +37 -0
  43. files_sdk/models/exavault_api_request_log.py +85 -0
  44. files_sdk/models/external_event.py +148 -0
  45. files_sdk/models/file.py +791 -0
  46. files_sdk/models/file_action.py +39 -0
  47. files_sdk/models/file_comment.py +191 -0
  48. files_sdk/models/file_comment_reaction.py +125 -0
  49. files_sdk/models/file_migration.py +69 -0
  50. files_sdk/models/file_migration_log.py +78 -0
  51. files_sdk/models/file_upload_part.py +54 -0
  52. files_sdk/models/folder.py +154 -0
  53. files_sdk/models/form_field.py +43 -0
  54. files_sdk/models/form_field_set.py +240 -0
  55. files_sdk/models/ftp_action_log.py +87 -0
  56. files_sdk/models/gpg_key.py +254 -0
  57. files_sdk/models/group.py +276 -0
  58. files_sdk/models/group_user.py +231 -0
  59. files_sdk/models/history.py +236 -0
  60. files_sdk/models/history_export.py +238 -0
  61. files_sdk/models/history_export_result.py +98 -0
  62. files_sdk/models/image.py +37 -0
  63. files_sdk/models/inbox_recipient.py +118 -0
  64. files_sdk/models/inbox_registration.py +79 -0
  65. files_sdk/models/inbox_upload.py +80 -0
  66. files_sdk/models/invoice.py +91 -0
  67. files_sdk/models/invoice_line_item.py +46 -0
  68. files_sdk/models/ip_address.py +119 -0
  69. files_sdk/models/lock.py +158 -0
  70. files_sdk/models/message.py +244 -0
  71. files_sdk/models/message_comment.py +223 -0
  72. files_sdk/models/message_comment_reaction.py +181 -0
  73. files_sdk/models/message_reaction.py +170 -0
  74. files_sdk/models/notification.py +357 -0
  75. files_sdk/models/outbound_connection_log.py +88 -0
  76. files_sdk/models/payment.py +91 -0
  77. files_sdk/models/payment_line_item.py +42 -0
  78. files_sdk/models/permission.py +174 -0
  79. files_sdk/models/preview.py +40 -0
  80. files_sdk/models/priority.py +63 -0
  81. files_sdk/models/project.py +205 -0
  82. files_sdk/models/public_hosting_request_log.py +82 -0
  83. files_sdk/models/public_ip_address.py +42 -0
  84. files_sdk/models/public_key.py +212 -0
  85. files_sdk/models/remote_bandwidth_snapshot.py +91 -0
  86. files_sdk/models/remote_server.py +1677 -0
  87. files_sdk/models/remote_server_configuration_file.py +72 -0
  88. files_sdk/models/request.py +180 -0
  89. files_sdk/models/restore.py +104 -0
  90. files_sdk/models/session.py +100 -0
  91. files_sdk/models/settings_change.py +71 -0
  92. files_sdk/models/sftp_action_log.py +91 -0
  93. files_sdk/models/sftp_host_key.py +215 -0
  94. files_sdk/models/share_group.py +228 -0
  95. files_sdk/models/share_group_member.py +41 -0
  96. files_sdk/models/siem_http_destination.py +773 -0
  97. files_sdk/models/site.py +767 -0
  98. files_sdk/models/snapshot.py +255 -0
  99. files_sdk/models/sso_strategy.py +167 -0
  100. files_sdk/models/status.py +42 -0
  101. files_sdk/models/style.py +152 -0
  102. files_sdk/models/sync_log.py +75 -0
  103. files_sdk/models/usage_by_top_level_dir.py +41 -0
  104. files_sdk/models/usage_daily_snapshot.py +93 -0
  105. files_sdk/models/usage_snapshot.py +73 -0
  106. files_sdk/models/user.py +893 -0
  107. files_sdk/models/user_cipher_use.py +68 -0
  108. files_sdk/models/user_request.py +166 -0
  109. files_sdk/models/user_sftp_client_use.py +68 -0
  110. files_sdk/models/web_dav_action_log.py +87 -0
  111. files_sdk/models/webhook_test.py +104 -0
  112. files_sdk/path_util.py +42 -0
  113. files_sdk/util.py +34 -0
README.md ADDED
@@ -0,0 +1,682 @@
1
+ # Files.com Python Client
2
+
3
+ The content included here should be enough to get started, but please visit our
4
+ [Developer Documentation Website](https://developers.files.com/python/) for the complete documentation.
5
+
6
+ ## Introduction
7
+
8
+ The Files.com Python package is the best way to use Files.com from applications written in the Python language.
9
+
10
+ Files.com customers use our Python package for directly working with files and folders as well as performing management tasks such as adding/removing users, onboarding counterparties, retrieving information about automations and more.
11
+
12
+ Every function in the Files.com application is available via Python. Nothing is excluded.
13
+
14
+ This package is officially supported by Files.com for Python 3.8+. Prior versions of Python are considered end-of-life by the Python Software Foundation and Files.com only supports environments that are still supported by their vendor. With that said, we believe that this package works in Python 3.5-3.7 as well.
15
+
16
+ The Python package uses the Files.com RESTful APIs via the HTTPS protocol (port 443) to securely communicate and transfer files so no firewall changes should be required in order to allow connectivity to Files.com.
17
+
18
+ ### Installation
19
+
20
+ Use `pip` to install the latest version of the `Files.com` package.
21
+
22
+ ```shell
23
+ pip3 install Files.com
24
+ ```
25
+
26
+ Files.com automatically pushes a new release to PIP every time a commit is made to the `master` branch on GitHub, so there is no benefit in directly linking the package from GitHub.
27
+
28
+ ### Files.com is Committed to Python
29
+
30
+ Python is the most commonly used language for custom integrations to Files.com. Our Files.com Desktop v6 application (that we publish) is also written in Python, using this exact same package.
31
+
32
+ Explore the [files-sdk-python](https://github.com/Files-com/files-sdk-python) code on GitHub.
33
+
34
+ ### Getting Support
35
+
36
+ The Files.com Support team provides official support for all of our official Files.com integration tools.
37
+
38
+ To initiate a support conversation, you can send an [Authenticated Support Request](https://www.files.com/docs/overview/requesting-support) or simply send an E-Mail to support@files.com.
39
+
40
+ ## Authentication
41
+
42
+ There are two ways to authenticate: API Key authentication and Session-based authentication.
43
+
44
+ ### Authenticate with an API Key
45
+
46
+ Authenticating with an API key is the recommended authentication method for most scenarios, and is
47
+ the method used in the examples on this site.
48
+
49
+ To use an API Key, first generate an API key from the [web
50
+ interface](https://www.files.com/docs/sdk-and-apis/api-keys) or [via the API or an
51
+ SDK](/python/resources/developers/api-keys).
52
+
53
+ Note that when using a user-specific API key, if the user is an administrator, you will have full
54
+ access to the entire API. If the user is not an administrator, you will only be able to access files
55
+ that user can access, and no access will be granted to site administration functions in the API.
56
+
57
+ ```python title="Example Request"
58
+ import files_sdk
59
+
60
+ files_sdk.set_api_key("YOUR_API_KEY")
61
+
62
+ ## Alternatively, you can specify the API key on a per-request basis in the final parameter to any method or initializer.
63
+ try:
64
+ files_sdk.user.list(params, {"api_key": "YOUR_API_KEY"})
65
+ except files_sdk.error.NotAuthenticatedError as err:
66
+ print(f"Authentication Error Occurred ({type(err).__name__}):", err)
67
+ except files_sdk.error.Error as err:
68
+ print(f"Unknown Error Occurred ({type(err).__name__}):", err)
69
+ ```
70
+
71
+ Don't forget to replace the placeholder, `YOUR_API_KEY`, with your actual API key.
72
+
73
+ ### Authenticate with a Session
74
+
75
+ You can also authenticate by creating a user session using the username and
76
+ password of an active user. If the user is an administrator, the session will have full access to
77
+ all capabilities of Files.com. Sessions created from regular user accounts will only be able to access files that
78
+ user can access, and no access will be granted to site administration functions.
79
+
80
+ Sessions use the exact same session timeout settings as web interface sessions. When a
81
+ session times out, simply create a new session and resume where you left off. This process is not
82
+ automatically handled by our SDKs because we do not want to store password information in memory without
83
+ your explicit consent.
84
+
85
+ #### Logging In
86
+
87
+ To create a session, the `create` method is called on the `files_sdk` object with the user's username and
88
+ password.
89
+
90
+ This returns a session object that can be used to authenticate SDK method calls.
91
+
92
+ ```python title="Example Request"
93
+ import files_sdk
94
+
95
+ try:
96
+ session = files_sdk.session.create({ "username": "motor", "password": "vroom" })
97
+ except files_sdk.error.NotAuthenticatedError as err:
98
+ print(f"Authentication Error Occurred ({type(err).__name__}):", err)
99
+ except files_sdk.error.Error as err:
100
+ print(f"Unknown Error Occurred ({type(err).__name__}):", err)
101
+ ```
102
+
103
+ #### Using a Session
104
+
105
+ Once a session has been created, you can store the session globally, use the session per object, or use the session per request to authenticate SDK operations.
106
+
107
+ ```python title="Example Request"
108
+ import files_sdk
109
+
110
+ ## You may set the returned session to be used by default for subsequent requests.
111
+ files_sdk.set_session(session)
112
+
113
+ try:
114
+ # Alternatively, you can specify the session ID on a per-object basis in the second parameter to a model constructor.
115
+ user = files_sdk.user.User(params, {"session_id": session.id})
116
+
117
+ # You may also specify the session ID on a per-request basis in the final parameter to static methods.
118
+ files_sdk.user.find(id, params, {"session_id": session.id})
119
+ except files_sdk.error.NotAuthenticatedError as err:
120
+ print(f"Authentication Error Occurred ({type(err).__name__}):", err)
121
+ except files_sdk.error.Error as err:
122
+ print(f"Unknown Error Occurred ({type(err).__name__}):", err)
123
+ ```
124
+
125
+ #### Logging Out
126
+
127
+ User sessions can be ended calling the `destroy` method on the `session` object.
128
+
129
+ ```python title="Example Request"
130
+ session.destroy()
131
+ ```
132
+
133
+ ## Configuration
134
+
135
+ Global configuration is performed by setting attributes on the `files_sdk` object.
136
+
137
+ ### Configuration Options
138
+
139
+ #### Base URL
140
+
141
+ Setting the base URL for the API is required if your site is configured to disable global acceleration.
142
+ This can also be set to use a mock server in development or CI.
143
+
144
+ ```python title="Example setting"
145
+ import files_sdk
146
+
147
+ files_sdk.base_url = "https://SUBDOMAIN.files.com"
148
+ ```
149
+
150
+ #### Log Level
151
+
152
+ This SDK utilizes the standard Python logging framework. It will respect the global log level
153
+ and you can set the module specific log level and other logging settings by getting the logger
154
+ object in the standard manner as shown below:
155
+
156
+ ```python title="Example setting"
157
+ import logging
158
+
159
+ logging.getLogger("files_sdk")
160
+ ```
161
+
162
+ #### Console Log Level
163
+
164
+ Enables printing of messages to stderr in addition to normal logging.
165
+
166
+ Allowed values are:
167
+
168
+ * `None`
169
+ * "info"
170
+ * "debug"
171
+
172
+ ```python title="Example setting"
173
+ import files_sdk
174
+
175
+ files_sdk.console_log_level = "info"
176
+ ```
177
+
178
+ #### Open Timeout
179
+
180
+ Open timeout in seconds. The default value is 30.
181
+
182
+ ```python title="Example setting"
183
+ import files_sdk
184
+
185
+ files_sdk.open_timeout = 60
186
+ ```
187
+
188
+ #### Read Timeout
189
+
190
+ Read timeout in seconds. The default value is 60.
191
+
192
+ ```python title="Example setting"
193
+ import files_sdk
194
+
195
+ files_sdk.read_timeout = 90
196
+ ```
197
+
198
+ #### Initial Network Retry Delay
199
+
200
+ Initial retry delay in seconds. The default value is 0.5.
201
+
202
+ ```python title="Example setting"
203
+ import files_sdk
204
+
205
+ files_sdk.initial_network_retry_delay = 1
206
+ ```
207
+
208
+ #### Maximum Retry Delay
209
+
210
+ Maximum network retry delay in seconds. The default value is 2.
211
+
212
+ ```python title="Example setting"
213
+ import files_sdk
214
+
215
+ files_sdk.max_network_retry_delay = 5
216
+ ```
217
+
218
+ #### Maximum Network Retries
219
+
220
+ Maximum number of retries. The default value is 3.
221
+
222
+ ```python title="Example setting"
223
+ import files_sdk
224
+
225
+ files_sdk.max_network_retries = 5
226
+ ```
227
+
228
+ #### Source IP
229
+
230
+ Configure the local IP address from which to send requests.
231
+
232
+ ```python title="Example setting"
233
+ import files_sdk
234
+
235
+ files_sdk.source_ip = '10.1.2.3'
236
+ ```
237
+
238
+ ## Sort and Filter
239
+
240
+ Several of the Files.com API resources have list operations that return multiple instances of the
241
+ resource. The List operations can be sorted and filtered.
242
+
243
+ ### Sorting
244
+
245
+ To sort the returned data, pass in the ```sort_by``` method argument.
246
+
247
+ Each resource supports a unique set of valid sort fields and can only be sorted by one field at a
248
+ time.
249
+
250
+ The argument value is a Python dictionary that has a key of the resource field name sort on and a
251
+ value of either ```"asc"``` or ```"desc"``` to specify the sort order.
252
+
253
+ ```python title="Sort Example"
254
+ import files_sdk
255
+
256
+ try:
257
+ # users sorted by username
258
+ users = files_sdk.user.list({
259
+ "sort_by": { "username": "asc" }
260
+ })
261
+ for user in users.auto_paging_iter():
262
+ # Operate on user
263
+ except files_sdk.error.NotAuthenticatedError as err:
264
+ print(f"Authentication Error Occurred ({type(err).__name__}):", err)
265
+ except files_sdk.error.Error as err:
266
+ print(f"Unknown Error Occurred ({type(err).__name__}):", err)
267
+ ```
268
+
269
+ ### Filtering
270
+
271
+ Filters apply selection criteria to the underlying query that returns the results. They can be
272
+ applied individually or combined with other filters, and the resulting data can be sorted by a
273
+ single field.
274
+
275
+ Each resource supports a unique set of valid filter fields, filter combinations, and combinations of
276
+ filters and sort fields.
277
+
278
+ The passed in argument value is a Python dictionary that has a key of the resource field name to
279
+ filter on and a passed in value to use in the filter comparison.
280
+
281
+ #### Filter Types
282
+
283
+ | Filter | Type | Description |
284
+ | --------- | --------- | --------- |
285
+ | `filter` | Exact | Find resources that have an exact field value match to a passed in value. (i.e., FIELD_VALUE = PASS_IN_VALUE). |
286
+ | `filter_prefix` | Pattern | Find resources where the specified field is prefixed by the supplied value. This is applicable to values that are strings. |
287
+ | `filter_gt` | Range | Find resources that have a field value that is greater than the passed in value. (i.e., FIELD_VALUE > PASS_IN_VALUE). |
288
+ | `filter_gteq` | Range | Find resources that have a field value that is greater than or equal to the passed in value. (i.e., FIELD_VALUE >= PASS_IN_VALUE). |
289
+ | `filter_lt` | Range | Find resources that have a field value that is less than the passed in value. (i.e., FIELD_VALUE < PASS_IN_VALUE). |
290
+ | `filter_lteq` | Range | Find resources that have a field value that is less than or equal to the passed in value. (i.e., FIELD_VALUE \<= PASS_IN_VALUE). |
291
+
292
+ ```python title="Exact Filter Example"
293
+ import files_sdk
294
+
295
+ try:
296
+ # non admin users
297
+ users = files_sdk.user.list({
298
+ "filter": { "not_site_admin": true }
299
+ })
300
+ for user in users.auto_paging_iter():
301
+ # Operate on user
302
+ except files_sdk.error.NotAuthenticatedError as err:
303
+ print(f"Authentication Error Occurred ({type(err).__name__}):", err)
304
+ except files_sdk.error.Error as err:
305
+ print(f"Unknown Error Occurred ({type(err).__name__}):", err)
306
+ ```
307
+
308
+ ```python title="Range Filter Example"
309
+ import files_sdk
310
+
311
+ try:
312
+ # users who haven't logged in since 2024-01-01
313
+ users = files_sdk.user.list({
314
+ "filter_gteq": { "last_login_at": "2024-01-01" }
315
+ })
316
+ for user in users.auto_paging_iter():
317
+ # Operate on user
318
+ except files_sdk.error.NotAuthenticatedError as err:
319
+ print(f"Authentication Error Occurred ({type(err).__name__}):", err)
320
+ except files_sdk.error.Error as err:
321
+ print(f"Unknown Error Occurred ({type(err).__name__}):", err)
322
+ ```
323
+
324
+ ```python title="Pattern Filter Example"
325
+ import files_sdk
326
+
327
+ try:
328
+ # users whose usernames start with 'test'
329
+ users = files_sdk.user.list({
330
+ "filter_prefix": { "username": "test" }
331
+ })
332
+ for user in users.auto_paging_iter():
333
+ # Operate on user
334
+ except files_sdk.error.NotAuthenticatedError as err:
335
+ print(f"Authentication Error Occurred ({type(err).__name__}):", err)
336
+ except files_sdk.error.Error as err:
337
+ print(f"Unknown Error Occurred ({type(err).__name__}):", err)
338
+ ```
339
+
340
+ ```python title="Combination Filter with Sort Example"
341
+ import files_sdk
342
+
343
+ try:
344
+ # users whose usernames start with 'test' and are not admins
345
+ users = files_sdk.user.list({
346
+ "filter_prefix": { "username": "test" },
347
+ "filter": { "not_site_admin": "true" },
348
+ "sort_by": { "username": "asc" }
349
+ })
350
+ for user in users.auto_paging_iter():
351
+ # Operate on user
352
+ except files_sdk.error.NotAuthenticatedError as err:
353
+ print(f"Authentication Error Occurred ({type(err).__name__}):", err)
354
+ except files_sdk.error.Error as err:
355
+ print(f"Unknown Error Occurred ({type(err).__name__}):", err)
356
+ ```
357
+
358
+ ## Foreign Language Support
359
+
360
+ The Files.com Python SDK will soon be updated to support localized responses by using a configuration
361
+ method. When available, it can be used to guide the API in selecting a preferred language for applicable response content.
362
+
363
+ Language support currently applies to select human-facing fields only, such as notification messages
364
+ and error descriptions.
365
+
366
+ If the specified language is not supported or the value is omitted, the API defaults to English.
367
+
368
+ ## Errors
369
+
370
+ The Files.com Python SDK will return errors by raising exceptions. There are many exception classes defined in the Files SDK that correspond
371
+ to specific errors.
372
+
373
+ The raised exceptions come from two categories:
374
+
375
+ 1. SDK Exceptions - errors that originate within the SDK
376
+ 2. API Exceptions - errors that occur due to the response from the Files.com API. These errors are grouped into common error types.
377
+
378
+ There are several types of exceptions within each category. Exception classes indicate different types of errors and are named in a
379
+ fashion that describe the general premise of the originating error. More details can be found in the err object message.
380
+
381
+ Use standard Python exception handling to detect and deal with errors. It is generally recommended to handle specific errors first, then
382
+ handle the general `files_sdk.error.Error` exception as a catch-all.
383
+
384
+ ```python title="Example Error Handling"
385
+ import files_sdk
386
+
387
+ try:
388
+ session = files_sdk.session.create({ "username": "USERNAME", "password": "BADPASSWORD" })
389
+ except files_sdk.error.NotAuthenticatedError as err:
390
+ print(f"Authentication Error Occurred ({type(err).__name__}):", err)
391
+ except files_sdk.error.Error as err:
392
+ print(f"Unknown Error Occurred ({type(err).__name__}):", err)
393
+ ```
394
+
395
+ ### Error Types
396
+
397
+ #### SDK Errors
398
+
399
+ SDK errors are general errors that occur within the SDK code. Each exception class inherits from a standard `Error` base class.
400
+
401
+ ```python title="Example SDK Exception Class Inheritance Structure"
402
+ files_sdk.error.APIConnectionError -> files_sdk.error.Error -> Exception
403
+ ```
404
+ ##### SDK Exception Classes
405
+
406
+ | Error Class Name| Description |
407
+ | --------------- | ------------ |
408
+ | `APIConnectionError`| The Files.com API cannot be reached |
409
+ | `AuthenticationError`| Not enough authentication information has been provided |
410
+ | `InvalidParameterError`| A passed in parameter is invalid |
411
+ | `MissingParameterError`| A method parameter is missing |
412
+ | `NotImplementedError`| The called method has not be implemented by the SDK |
413
+
414
+ #### API Errors
415
+
416
+ API errors are errors returned by the Files.com API. Each exception class inherits from an error group base class.
417
+ The error group base class indicates a particular type of error.
418
+
419
+ ```python title="Example API Exception Class Inheritance Structure"
420
+ files_sdk.error.FolderAdminPermissionRequiredError -> files_sdk.error.NotAuthorizedError -> files_sdk.error.APIError -> files_sdk.error.Error -> Exception
421
+ ```
422
+ ##### API Exception Classes
423
+
424
+ | Error Class Name | Error Group |
425
+ | --------- | --------- |
426
+ |`AgentUpgradeRequiredError`| `BadRequestError` |
427
+ |`AttachmentTooLargeError`| `BadRequestError` |
428
+ |`CannotDownloadDirectoryError`| `BadRequestError` |
429
+ |`CantMoveWithMultipleLocationsError`| `BadRequestError` |
430
+ |`DatetimeParseError`| `BadRequestError` |
431
+ |`DestinationSameError`| `BadRequestError` |
432
+ |`DoesNotSupportSortingError`| `BadRequestError` |
433
+ |`FolderMustNotBeAFileError`| `BadRequestError` |
434
+ |`FoldersNotAllowedError`| `BadRequestError` |
435
+ |`InvalidBodyError`| `BadRequestError` |
436
+ |`InvalidCursorError`| `BadRequestError` |
437
+ |`InvalidCursorTypeForSortError`| `BadRequestError` |
438
+ |`InvalidEtagsError`| `BadRequestError` |
439
+ |`InvalidFilterAliasCombinationError`| `BadRequestError` |
440
+ |`InvalidFilterFieldError`| `BadRequestError` |
441
+ |`InvalidFilterParamError`| `BadRequestError` |
442
+ |`InvalidFilterParamFormatError`| `BadRequestError` |
443
+ |`InvalidFilterParamValueError`| `BadRequestError` |
444
+ |`InvalidInputEncodingError`| `BadRequestError` |
445
+ |`InvalidInterfaceError`| `BadRequestError` |
446
+ |`InvalidOauthProviderError`| `BadRequestError` |
447
+ |`InvalidPathError`| `BadRequestError` |
448
+ |`InvalidReturnToUrlError`| `BadRequestError` |
449
+ |`InvalidSortFieldError`| `BadRequestError` |
450
+ |`InvalidSortFilterCombinationError`| `BadRequestError` |
451
+ |`InvalidUploadOffsetError`| `BadRequestError` |
452
+ |`InvalidUploadPartGapError`| `BadRequestError` |
453
+ |`InvalidUploadPartSizeError`| `BadRequestError` |
454
+ |`MethodNotAllowedError`| `BadRequestError` |
455
+ |`MultipleSortParamsNotAllowedError`| `BadRequestError` |
456
+ |`NoValidInputParamsError`| `BadRequestError` |
457
+ |`PartNumberTooLargeError`| `BadRequestError` |
458
+ |`PathCannotHaveTrailingWhitespaceError`| `BadRequestError` |
459
+ |`ReauthenticationNeededFieldsError`| `BadRequestError` |
460
+ |`RequestParamsContainInvalidCharacterError`| `BadRequestError` |
461
+ |`RequestParamsInvalidError`| `BadRequestError` |
462
+ |`RequestParamsRequiredError`| `BadRequestError` |
463
+ |`SearchAllOnChildPathError`| `BadRequestError` |
464
+ |`UnrecognizedSortIndexError`| `BadRequestError` |
465
+ |`UnsupportedCurrencyError`| `BadRequestError` |
466
+ |`UnsupportedHttpResponseFormatError`| `BadRequestError` |
467
+ |`UnsupportedMediaTypeError`| `BadRequestError` |
468
+ |`UserIdInvalidError`| `BadRequestError` |
469
+ |`UserIdOnUserEndpointError`| `BadRequestError` |
470
+ |`UserRequiredError`| `BadRequestError` |
471
+ |`AdditionalAuthenticationRequiredError`| `NotAuthenticatedError` |
472
+ |`ApiKeySessionsNotSupportedError`| `NotAuthenticatedError` |
473
+ |`AuthenticationRequiredError`| `NotAuthenticatedError` |
474
+ |`BundleRegistrationCodeFailedError`| `NotAuthenticatedError` |
475
+ |`FilesAgentTokenFailedError`| `NotAuthenticatedError` |
476
+ |`InboxRegistrationCodeFailedError`| `NotAuthenticatedError` |
477
+ |`InvalidCredentialsError`| `NotAuthenticatedError` |
478
+ |`InvalidOauthError`| `NotAuthenticatedError` |
479
+ |`InvalidOrExpiredCodeError`| `NotAuthenticatedError` |
480
+ |`InvalidSessionError`| `NotAuthenticatedError` |
481
+ |`InvalidUsernameOrPasswordError`| `NotAuthenticatedError` |
482
+ |`LockedOutError`| `NotAuthenticatedError` |
483
+ |`LockoutRegionMismatchError`| `NotAuthenticatedError` |
484
+ |`OneTimePasswordIncorrectError`| `NotAuthenticatedError` |
485
+ |`TwoFactorAuthenticationErrorError`| `NotAuthenticatedError` |
486
+ |`TwoFactorAuthenticationSetupExpiredError`| `NotAuthenticatedError` |
487
+ |`ApiKeyIsDisabledError`| `NotAuthorizedError` |
488
+ |`ApiKeyIsPathRestrictedError`| `NotAuthorizedError` |
489
+ |`ApiKeyOnlyForDesktopAppError`| `NotAuthorizedError` |
490
+ |`ApiKeyOnlyForMobileAppError`| `NotAuthorizedError` |
491
+ |`ApiKeyOnlyForOfficeIntegrationError`| `NotAuthorizedError` |
492
+ |`BillingOrSiteAdminPermissionRequiredError`| `NotAuthorizedError` |
493
+ |`BillingPermissionRequiredError`| `NotAuthorizedError` |
494
+ |`BundleMaximumUsesReachedError`| `NotAuthorizedError` |
495
+ |`BundlePermissionRequiredError`| `NotAuthorizedError` |
496
+ |`CannotLoginWhileUsingKeyError`| `NotAuthorizedError` |
497
+ |`CantActForOtherUserError`| `NotAuthorizedError` |
498
+ |`ContactAdminForPasswordChangeHelpError`| `NotAuthorizedError` |
499
+ |`FilesAgentFailedAuthorizationError`| `NotAuthorizedError` |
500
+ |`FolderAdminOrBillingPermissionRequiredError`| `NotAuthorizedError` |
501
+ |`FolderAdminPermissionRequiredError`| `NotAuthorizedError` |
502
+ |`FullPermissionRequiredError`| `NotAuthorizedError` |
503
+ |`HistoryPermissionRequiredError`| `NotAuthorizedError` |
504
+ |`InsufficientPermissionForParamsError`| `NotAuthorizedError` |
505
+ |`InsufficientPermissionForSiteError`| `NotAuthorizedError` |
506
+ |`MustAuthenticateWithApiKeyError`| `NotAuthorizedError` |
507
+ |`NeedAdminPermissionForInboxError`| `NotAuthorizedError` |
508
+ |`NonAdminsMustQueryByFolderOrPathError`| `NotAuthorizedError` |
509
+ |`NotAllowedToCreateBundleError`| `NotAuthorizedError` |
510
+ |`PasswordChangeNotRequiredError`| `NotAuthorizedError` |
511
+ |`PasswordChangeRequiredError`| `NotAuthorizedError` |
512
+ |`ReadOnlySessionError`| `NotAuthorizedError` |
513
+ |`ReadPermissionRequiredError`| `NotAuthorizedError` |
514
+ |`ReauthenticationFailedError`| `NotAuthorizedError` |
515
+ |`ReauthenticationFailedFinalError`| `NotAuthorizedError` |
516
+ |`ReauthenticationNeededActionError`| `NotAuthorizedError` |
517
+ |`RecaptchaFailedError`| `NotAuthorizedError` |
518
+ |`SelfManagedRequiredError`| `NotAuthorizedError` |
519
+ |`SiteAdminRequiredError`| `NotAuthorizedError` |
520
+ |`SiteFilesAreImmutableError`| `NotAuthorizedError` |
521
+ |`TwoFactorAuthenticationRequiredError`| `NotAuthorizedError` |
522
+ |`UserIdWithoutSiteAdminError`| `NotAuthorizedError` |
523
+ |`WriteAndBundlePermissionRequiredError`| `NotAuthorizedError` |
524
+ |`WritePermissionRequiredError`| `NotAuthorizedError` |
525
+ |`ApiKeyNotFoundError`| `NotFoundError` |
526
+ |`BundlePathNotFoundError`| `NotFoundError` |
527
+ |`BundleRegistrationNotFoundError`| `NotFoundError` |
528
+ |`CodeNotFoundError`| `NotFoundError` |
529
+ |`FileNotFoundError`| `NotFoundError` |
530
+ |`FileUploadNotFoundError`| `NotFoundError` |
531
+ |`FolderNotFoundError`| `NotFoundError` |
532
+ |`GroupNotFoundError`| `NotFoundError` |
533
+ |`InboxNotFoundError`| `NotFoundError` |
534
+ |`NestedNotFoundError`| `NotFoundError` |
535
+ |`PlanNotFoundError`| `NotFoundError` |
536
+ |`SiteNotFoundError`| `NotFoundError` |
537
+ |`UserNotFoundError`| `NotFoundError` |
538
+ |`AlreadyCompletedError`| `ProcessingFailureError` |
539
+ |`AutomationCannotBeRunManuallyError`| `ProcessingFailureError` |
540
+ |`BehaviorNotAllowedOnRemoteServerError`| `ProcessingFailureError` |
541
+ |`BundleOnlyAllowsPreviewsError`| `ProcessingFailureError` |
542
+ |`BundleOperationRequiresSubfolderError`| `ProcessingFailureError` |
543
+ |`CouldNotCreateParentError`| `ProcessingFailureError` |
544
+ |`DestinationExistsError`| `ProcessingFailureError` |
545
+ |`DestinationFolderLimitedError`| `ProcessingFailureError` |
546
+ |`DestinationParentConflictError`| `ProcessingFailureError` |
547
+ |`DestinationParentDoesNotExistError`| `ProcessingFailureError` |
548
+ |`ExceededRuntimeLimitError`| `ProcessingFailureError` |
549
+ |`ExpiredPrivateKeyError`| `ProcessingFailureError` |
550
+ |`ExpiredPublicKeyError`| `ProcessingFailureError` |
551
+ |`ExportFailureError`| `ProcessingFailureError` |
552
+ |`ExportNotReadyError`| `ProcessingFailureError` |
553
+ |`FailedToChangePasswordError`| `ProcessingFailureError` |
554
+ |`FileLockedError`| `ProcessingFailureError` |
555
+ |`FileNotUploadedError`| `ProcessingFailureError` |
556
+ |`FilePendingProcessingError`| `ProcessingFailureError` |
557
+ |`FileProcessingErrorError`| `ProcessingFailureError` |
558
+ |`FileTooBigToDecryptError`| `ProcessingFailureError` |
559
+ |`FileTooBigToEncryptError`| `ProcessingFailureError` |
560
+ |`FileUploadedToWrongRegionError`| `ProcessingFailureError` |
561
+ |`FilenameTooLongError`| `ProcessingFailureError` |
562
+ |`FolderLockedError`| `ProcessingFailureError` |
563
+ |`FolderNotEmptyError`| `ProcessingFailureError` |
564
+ |`HistoryUnavailableError`| `ProcessingFailureError` |
565
+ |`InvalidBundleCodeError`| `ProcessingFailureError` |
566
+ |`InvalidFileTypeError`| `ProcessingFailureError` |
567
+ |`InvalidFilenameError`| `ProcessingFailureError` |
568
+ |`InvalidPriorityColorError`| `ProcessingFailureError` |
569
+ |`InvalidRangeError`| `ProcessingFailureError` |
570
+ |`InvalidSiteError`| `ProcessingFailureError` |
571
+ |`ModelSaveErrorError`| `ProcessingFailureError` |
572
+ |`MultipleProcessingErrorsError`| `ProcessingFailureError` |
573
+ |`PathTooLongError`| `ProcessingFailureError` |
574
+ |`RecipientAlreadySharedError`| `ProcessingFailureError` |
575
+ |`RemoteServerErrorError`| `ProcessingFailureError` |
576
+ |`ResourceBelongsToParentSiteError`| `ProcessingFailureError` |
577
+ |`ResourceLockedError`| `ProcessingFailureError` |
578
+ |`SubfolderLockedError`| `ProcessingFailureError` |
579
+ |`TwoFactorAuthenticationCodeAlreadySentError`| `ProcessingFailureError` |
580
+ |`TwoFactorAuthenticationCountryBlacklistedError`| `ProcessingFailureError` |
581
+ |`TwoFactorAuthenticationGeneralErrorError`| `ProcessingFailureError` |
582
+ |`TwoFactorAuthenticationMethodUnsupportedErrorError`| `ProcessingFailureError` |
583
+ |`TwoFactorAuthenticationUnsubscribedRecipientError`| `ProcessingFailureError` |
584
+ |`UpdatesNotAllowedForRemotesError`| `ProcessingFailureError` |
585
+ |`DuplicateShareRecipientError`| `RateLimitedError` |
586
+ |`ReauthenticationRateLimitedError`| `RateLimitedError` |
587
+ |`TooManyConcurrentLoginsError`| `RateLimitedError` |
588
+ |`TooManyConcurrentRequestsError`| `RateLimitedError` |
589
+ |`TooManyLoginAttemptsError`| `RateLimitedError` |
590
+ |`TooManyRequestsError`| `RateLimitedError` |
591
+ |`TooManySharesError`| `RateLimitedError` |
592
+ |`AgentUnavailableError`| `ServiceUnavailableError` |
593
+ |`AutomationsUnavailableError`| `ServiceUnavailableError` |
594
+ |`MigrationInProgressError`| `ServiceUnavailableError` |
595
+ |`SiteDisabledError`| `ServiceUnavailableError` |
596
+ |`UploadsUnavailableError`| `ServiceUnavailableError` |
597
+ |`AccountAlreadyExistsError`| `SiteConfigurationError` |
598
+ |`AccountOverdueError`| `SiteConfigurationError` |
599
+ |`NoAccountForSiteError`| `SiteConfigurationError` |
600
+ |`SiteWasRemovedError`| `SiteConfigurationError` |
601
+ |`TrialExpiredError`| `SiteConfigurationError` |
602
+ |`TrialLockedError`| `SiteConfigurationError` |
603
+ |`UserRequestsEnabledRequiredError`| `SiteConfigurationError` |
604
+
605
+ ## Pagination
606
+
607
+ Certain API operations return lists of objects. When the number of objects in the list is large,
608
+ the API will paginate the results.
609
+
610
+ The Files.com Python SDK provides multiple ways to paginate through lists of objects.
611
+
612
+ ### Automatic Pagination
613
+
614
+ The `auto_paging_iter` method automatically paginates and loads each page into memory.
615
+
616
+ ```python title="Example Request"
617
+ import files_sdk
618
+
619
+ try:
620
+ for item in files_sdk.folder.list_for("remote/path/to/folder").auto_paging_iter():
621
+ print(item.type, item.path)
622
+ except files_sdk.error.NotAuthenticatedError as err:
623
+ print(f"Authentication Error Occurred ({type(err).__name__}):", err)
624
+ except files_sdk.error.Error as err:
625
+ print(f"Unknown Error Occurred ({type(err).__name__}):", err)
626
+ ```
627
+
628
+ ### Manual Pagination
629
+
630
+ The `load_next_page/has_next_page` methods allow for manual pagination and loading of each page into memory.
631
+
632
+ ```python title="Example Request"
633
+ import files_sdk
634
+
635
+ try:
636
+ list_obj = files_sdk.folder.list_for("remote/path/to/folder")
637
+
638
+ while True:
639
+ for item in list_obj:
640
+ print(item.type, item.path)
641
+ if not list_obj.has_next_page:
642
+ break
643
+ list_obj.load_next_page()
644
+ except files_sdk.error.NotAuthenticatedError as err:
645
+ print(f"Authentication Error Occurred ({type(err).__name__}):", err)
646
+ except files_sdk.error.Error as err:
647
+ print(f"Unknown Error Occurred ({type(err).__name__}):", err)
648
+ ```
649
+
650
+ ## Case Sensitivity
651
+
652
+ The Files.com API compares files and paths in a case-insensitive manner. For related documentation see [Case Sensitivity Documentation](https://www.files.com/docs/files-and-folders/file-system-semantics/case-sensitivity).
653
+
654
+ The `path_util.is_same` function in the Files.com SDK is designed to help you determine if two paths on
655
+ your native file system would be considered the same on Files.com. This is particularly important
656
+ when handling errors related to duplicate file names and when developing tools for folder
657
+ synchronization.
658
+
659
+ ```python title="Compare Case-Insensitive Files and Paths"
660
+ import files_sdk
661
+
662
+ if files_sdk.path_util.is_same("Fïłèńämê.Txt", "filename.txt"):
663
+ print("Paths are the same")
664
+ ```
665
+
666
+ ## Mock Server
667
+
668
+ Files.com publishes a Files.com API server, which is useful for testing your use of the Files.com
669
+ SDKs and other direct integrations against the Files.com API in an integration test environment.
670
+
671
+ It is a Ruby app that operates as a minimal server for the purpose of testing basic network
672
+ operations and JSON encoding for your SDK or API client. It does not maintain state and it does not
673
+ deeply inspect your submissions for correctness.
674
+
675
+ Eventually we will add more features intended for integration testing, such as the ability to
676
+ intentionally provoke errors.
677
+
678
+ Download the server as a Docker image via [Docker Hub](https://hub.docker.com/r/filescom/files-mock-server).
679
+
680
+ The Source Code is also available on [GitHub](https://github.com/Files-com/files-mock-server).
681
+
682
+ A README is available on the GitHub link.
_VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.5.0