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