Files.com 1.4.112__tar.gz → 1.4.114__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.
Files changed (114) hide show
  1. {Files.com-1.4.112 → Files.com-1.4.114}/Files.com.egg-info/PKG-INFO +1 -1
  2. {Files.com-1.4.112 → Files.com-1.4.114}/Files.com.egg-info/SOURCES.txt +0 -1
  3. {Files.com-1.4.112 → Files.com-1.4.114}/PKG-INFO +1 -1
  4. Files.com-1.4.114/README.md +576 -0
  5. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/__init__.py +1 -3
  6. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/__init__.py +0 -1
  7. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/file.py +2 -2
  8. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/file_action.py +1 -1
  9. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/sftp_host_key.py +1 -1
  10. Files.com-1.4.112/README.md +0 -228
  11. Files.com-1.4.112/files_sdk/models/action_webhook_failure.py +0 -76
  12. {Files.com-1.4.112 → Files.com-1.4.114}/Files.com.egg-info/dependency_links.txt +0 -0
  13. {Files.com-1.4.112 → Files.com-1.4.114}/Files.com.egg-info/requires.txt +0 -0
  14. {Files.com-1.4.112 → Files.com-1.4.114}/Files.com.egg-info/top_level.txt +0 -0
  15. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/api.py +0 -0
  16. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/api_client.py +0 -0
  17. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/error.py +0 -0
  18. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/list_obj.py +0 -0
  19. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/account_line_item.py +0 -0
  20. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/action.py +0 -0
  21. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/action_notification_export.py +0 -0
  22. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/action_notification_export_result.py +0 -0
  23. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/api_key.py +0 -0
  24. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/api_request_log.py +0 -0
  25. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/app.py +0 -0
  26. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/as2_incoming_message.py +0 -0
  27. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/as2_outgoing_message.py +0 -0
  28. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/as2_partner.py +0 -0
  29. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/as2_station.py +0 -0
  30. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/auto.py +0 -0
  31. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/automation.py +0 -0
  32. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/automation_log.py +0 -0
  33. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/automation_run.py +0 -0
  34. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/bandwidth_snapshot.py +0 -0
  35. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/behavior.py +0 -0
  36. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/bundle.py +0 -0
  37. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/bundle_action.py +0 -0
  38. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/bundle_download.py +0 -0
  39. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/bundle_notification.py +0 -0
  40. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/bundle_path.py +0 -0
  41. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/bundle_recipient.py +0 -0
  42. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/bundle_registration.py +0 -0
  43. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/clickwrap.py +0 -0
  44. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/dns_record.py +0 -0
  45. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/email_incoming_message.py +0 -0
  46. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/email_log.py +0 -0
  47. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/errors.py +0 -0
  48. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/exavault_api_request_log.py +0 -0
  49. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/external_event.py +0 -0
  50. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/file_comment.py +0 -0
  51. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/file_comment_reaction.py +0 -0
  52. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/file_migration.py +0 -0
  53. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/file_migration_log.py +0 -0
  54. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/file_upload_part.py +0 -0
  55. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/folder.py +0 -0
  56. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/form_field.py +0 -0
  57. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/form_field_set.py +0 -0
  58. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/ftp_action_log.py +0 -0
  59. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/gpg_key.py +0 -0
  60. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/group.py +0 -0
  61. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/group_user.py +0 -0
  62. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/history.py +0 -0
  63. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/history_export.py +0 -0
  64. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/history_export_result.py +0 -0
  65. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/image.py +0 -0
  66. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/inbox_recipient.py +0 -0
  67. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/inbox_registration.py +0 -0
  68. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/inbox_upload.py +0 -0
  69. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/invoice.py +0 -0
  70. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/invoice_line_item.py +0 -0
  71. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/ip_address.py +0 -0
  72. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/lock.py +0 -0
  73. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/message.py +0 -0
  74. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/message_comment.py +0 -0
  75. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/message_comment_reaction.py +0 -0
  76. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/message_reaction.py +0 -0
  77. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/notification.py +0 -0
  78. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/outbound_connection_log.py +0 -0
  79. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/payment.py +0 -0
  80. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/payment_line_item.py +0 -0
  81. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/permission.py +0 -0
  82. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/preview.py +0 -0
  83. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/priority.py +0 -0
  84. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/project.py +0 -0
  85. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/public_hosting_request_log.py +0 -0
  86. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/public_ip_address.py +0 -0
  87. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/public_key.py +0 -0
  88. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/remote_bandwidth_snapshot.py +0 -0
  89. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/remote_server.py +0 -0
  90. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/remote_server_configuration_file.py +0 -0
  91. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/request.py +0 -0
  92. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/session.py +0 -0
  93. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/settings_change.py +0 -0
  94. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/sftp_action_log.py +0 -0
  95. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/share_group.py +0 -0
  96. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/share_group_member.py +0 -0
  97. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/site.py +0 -0
  98. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/snapshot.py +0 -0
  99. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/sso_strategy.py +0 -0
  100. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/status.py +0 -0
  101. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/style.py +0 -0
  102. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/sync_log.py +0 -0
  103. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/usage_daily_snapshot.py +0 -0
  104. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/usage_snapshot.py +0 -0
  105. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/user.py +0 -0
  106. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/user_cipher_use.py +0 -0
  107. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/user_request.py +0 -0
  108. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/web_dav_action_log.py +0 -0
  109. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/models/webhook_test.py +0 -0
  110. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/path_util.py +0 -0
  111. {Files.com-1.4.112 → Files.com-1.4.114}/files_sdk/util.py +0 -0
  112. {Files.com-1.4.112 → Files.com-1.4.114}/pyproject.toml +0 -0
  113. {Files.com-1.4.112 → Files.com-1.4.114}/setup.cfg +0 -0
  114. {Files.com-1.4.112 → Files.com-1.4.114}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.2
2
2
  Name: Files.com
3
- Version: 1.4.112
3
+ Version: 1.4.114
4
4
  Summary: Python bindings for the Files.com API
5
5
  Home-page: UNKNOWN
6
6
  License: MIT
@@ -18,7 +18,6 @@ files_sdk/models/account_line_item.py
18
18
  files_sdk/models/action.py
19
19
  files_sdk/models/action_notification_export.py
20
20
  files_sdk/models/action_notification_export_result.py
21
- files_sdk/models/action_webhook_failure.py
22
21
  files_sdk/models/api_key.py
23
22
  files_sdk/models/api_request_log.py
24
23
  files_sdk/models/app.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.2
2
2
  Name: Files.com
3
- Version: 1.4.112
3
+ Version: 1.4.114
4
4
  Summary: Python bindings for the Files.com API
5
5
  Home-page: UNKNOWN
6
6
  License: MIT
@@ -0,0 +1,576 @@
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 client library provides convenient access to the Files.com API from applications written in the Python language.
9
+
10
+ ### Installation
11
+
12
+ To install the package:
13
+
14
+ ```shell
15
+ pip3 install Files.com
16
+ ````
17
+
18
+ #### Requirements
19
+
20
+ * Python 3.5+
21
+ * requests
22
+
23
+ ### Usage
24
+
25
+ ```python
26
+ import files_sdk
27
+ ````
28
+
29
+ <Note title="Repository">
30
+ Explore the [files-sdk-python](https://github.com/Files-com/files-sdk-python) code on GitHub.
31
+ </Note>
32
+
33
+ ### Getting Support
34
+
35
+ The Files.com team is happy to help with any SDK Integration challenges you
36
+ may face.
37
+
38
+ Just email support@files.com and we'll get the process started.
39
+
40
+ ## Authentication
41
+
42
+ ### Authenticate with an API Key
43
+
44
+ Authenticating with an API key is the recommended authentication method for most scenarios, and is
45
+ the method used in the examples on this site.
46
+
47
+ To use the API or SDKs with an API Key, first generate an API key from the [web
48
+ interface](https://www.files.com/docs/sdk-and-apis/api-keys) or [via the API or an
49
+ SDK](/python/resources/developers/api-keys).
50
+
51
+ Note that when using a user-specific API key, if the user is an administrator, you will have full
52
+ access to the entire API. If the user is not an administrator, you will only be able to access files
53
+ that user can access, and no access will be granted to site administration functions in the API.
54
+
55
+ ```python title="Example Request"
56
+ files_sdk.set_api_key("YOUR_API_KEY")
57
+
58
+ ## Alternatively, you can specify the API key on a per-request basis in the final parameter to any method or initializer.
59
+ files_sdk.user.list(params, {"api_key": "YOUR_API_KEY"})
60
+ ```
61
+
62
+ <Note>
63
+ Don't forget to replace the placeholder, `YOUR_API_KEY`, with your actual API key.
64
+ </Note>
65
+
66
+ ### Authenticate with a Session
67
+
68
+ You can also authenticate to the REST API or SDKs by creating a user session using the username and
69
+ password of an active user. If the user is an administrator, the session will have full access to
70
+ the entire API. Sessions created from regular user accounts will only be able to access files that
71
+ user can access, and no access will be granted to site administration functions.
72
+
73
+ API sessions use the exact same session timeout settings as web interface sessions. When an API
74
+ session times out, simply create a new session and resume where you left off. This process is not
75
+ automatically handled by SDKs because we do not want to store password information in memory without
76
+ your explicit consent.
77
+
78
+ #### Logging in
79
+
80
+ To create a session, the `create` method is called on the `files_sdk` object with the user's username and
81
+ password.
82
+
83
+ This returns a session object that can be used to authenticate SDK method calls.
84
+
85
+ ```python title="Example Request"
86
+ session = files_sdk.session.create({ "username": "motor", "password": "vroom" })
87
+ ```
88
+
89
+ #### Using a session
90
+
91
+ 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.
92
+
93
+ ```python title="Example Request"
94
+ ## You may set the returned session to be used by default for subsequent requests.
95
+ files_sdk.set_session(session)
96
+
97
+ ## Alternatively, you can specify the session ID on a per-object basis in the second parameter to a model constructor.
98
+ user = files_sdk.user.User(params, {"session_id": session.id})
99
+
100
+ ## You may also specify the session ID on a per-request basis in the final parameter to static methods.
101
+ files_sdk.user.find(id, params, {"session_id": session.id})
102
+ ```
103
+
104
+ #### Logging out
105
+
106
+ User sessions can be ended calling the `destroy` method on the `session` object.
107
+
108
+ ```python title="Example Request"
109
+ session.destroy()
110
+ ```
111
+
112
+ ## Configuration
113
+
114
+ ### Configuration options
115
+
116
+ #### Base URL
117
+
118
+ Setting the base URL for the API is required if your site is configured to disable global acceleration.
119
+ This can also be set to use a mock server in development or CI.
120
+
121
+ ```python title="Example setting"
122
+ files_sdk.base_url = "https://SUBDOMAIN.files.com"
123
+ ```
124
+
125
+ #### Log level
126
+
127
+ This SDK utilizes the standard Python logging framework. It will respect the global log level
128
+ and you can set the module specific log level and other logging settings by getting the logger
129
+ object in the standard manner as shown below:
130
+
131
+ ```python title="Example setting"
132
+ import logging
133
+ logging.getLogger("files_sdk")
134
+ ```
135
+
136
+ #### Console log level
137
+
138
+ Enables printing of messages to stderr in addition to normal logging.
139
+
140
+ Allowed values are:
141
+
142
+ * `None`
143
+ * "info"
144
+ * "debug"
145
+
146
+ ```python title="Example setting"
147
+ files_sdk.console_log_level = "info"
148
+ ```
149
+
150
+ #### Open timeout
151
+
152
+ Open timeout in seconds. The default value is 30.
153
+
154
+ ```python title="Example setting"
155
+ files_sdk.open_timeout = 60
156
+ ```
157
+
158
+ #### Read timeout
159
+
160
+ Read timeout in seconds. The default value is 80.
161
+
162
+ ```python title="Example setting"
163
+ files_sdk.read_timeout = 90
164
+ ```
165
+
166
+ #### Initial network retry delay
167
+
168
+ Initial retry delay in seconds. The default value is 0.5.
169
+
170
+ ```python title="Example setting"
171
+ files_sdk.initial_network_retry_delay = 1
172
+ ```
173
+
174
+ #### Maximum retry delay
175
+
176
+ Maximum network retry delay in seconds. The default value is 2.
177
+
178
+ ```python title="Example setting"
179
+ files_sdk.max_network_retry_delay = 5
180
+ ```
181
+
182
+ #### Maximum network retries
183
+
184
+ Maximum number of retries. The default value is 3.
185
+
186
+ ```python title="Example setting"
187
+ files_sdk.max_network_retries = 5
188
+ ```
189
+
190
+ #### Source IP
191
+
192
+ Configure the local IP address from which to send requests.
193
+
194
+ ```python title="Example setting"
195
+ files_sdk.source_ip = '10.1.2.3'
196
+ ```
197
+
198
+ ### Logging
199
+
200
+ The Files.com SDK is compatible with the standard log4j logging scheme.
201
+
202
+ Add `com.files` logger to your `Loggers` root in the `log4j2.xml` file.
203
+
204
+ ```xml title="log4j2.xml"
205
+ <Loggers>
206
+ <!-- set preferred level -->
207
+ <Logger name="com.files" level="TRACE" />
208
+ <!-- to enable network request -->
209
+ <Logger name="okhttp3.logging.wire" level="INFO"/>
210
+ </Loggers>
211
+ ```
212
+
213
+ Create a `resources/log4j2.xml` file.
214
+
215
+ ```xml title="resources/log4j2.xml"
216
+ <?xml version="1.0" encoding="UTF-8"?>
217
+ <Configuration>
218
+ <Appenders>
219
+ <Console name="Console" target="SYSTEM_OUT">
220
+ <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
221
+ </Console>
222
+ </Appenders>
223
+ <Loggers>
224
+ <!-- set preferred level -->
225
+ <Logger name="com.files" level="TRACE"/>
226
+ <!-- to enable network request -->
227
+ <Logger name="okhttp3.logging.wire" level="INFO"/>
228
+ </Loggers>
229
+ </Configuration>
230
+ ```
231
+
232
+ You can read more about [log4j2 configuration](https://logging.apache.org/log4j/2.x/manual/configuration.html).
233
+
234
+ ## Errors
235
+
236
+ The Files.com Python SDK will return errors by raising exceptions. There are many exception classes defined in the Files SDK that correspond
237
+ to specific errors.
238
+
239
+ The raised exceptions come from two categories:
240
+
241
+ 1. SDK Exceptions - errors that originate within the SDK
242
+ 2. API Exceptions - errors that occur due to the response from the Files.com API. These errors are grouped into common error types.
243
+
244
+ There are several types of exceptions within each category. Exception classes indicate different types of errors and are named in a
245
+ fashion that describe the general premise of the originating error. More details can be found in the err object message.
246
+
247
+ Use standard Python exception handling to detect and deal with errors. It is generally recommended to handle specific errors first, then
248
+ handle the general `files_sdk.error.Error` exception as a catch-all.
249
+
250
+ ```python title="Example Error Handling"
251
+ try:
252
+ session = files_sdk.session.create({ "username": "USERNAME", "password": "BADPASSWORD" })
253
+ except files_sdk.error.NotAuthenticatedError as err:
254
+ print(f"Authentication Error Occured ({type(err).__name__}):", err)
255
+ except files_sdk.error.Error as err:
256
+ print(f"Unknown Error Occured ({type(err).__name__}):", err)
257
+ ```
258
+
259
+ ### Error Types
260
+
261
+ #### SDK Errors
262
+
263
+ SDK errors are general errors that occure within the SDK code. Each exception class inherits from a standard `Error` base class.
264
+
265
+ ```python title="Example SDK Exception Class Inheritance Structure"
266
+ files_sdk.error.APIConnectionError -> files_sdk.error.Error -> Exception
267
+ ```
268
+ ##### SDK Exception Classes
269
+
270
+ | Error Class Name| Description |
271
+ | --------------- | ------------ |
272
+ | `APIConnectionError`| The Files.com API cannot be reached |
273
+ | `AuthenticationError`| Not enough authentication information has been provided |
274
+ | `InvalidParameterError`| A passed in parameter is invalid |
275
+ | `MissingParameterError`| A method parameter is missing |
276
+ | `NotImplementedError`| The called method has not be implemented by the SDK |
277
+
278
+ #### API Errors
279
+
280
+ API errors are errors returned by the Files.com API. Each exception class inherits from an error group base class.
281
+ The error group base class indicates a particular type of error.
282
+
283
+ ```python title="Example API Exception Class Inheritance Structure"
284
+ files_sdk.error.FolderAdminPermissionRequiredError -> files_sdk.error.NotAuthorizedError -> files_sdk.error.APIError -> files_sdk.error.Error -> Exception
285
+ ```
286
+ ##### API Exception Classes
287
+
288
+ | Error Class Name | Error Group |
289
+ | --------- | --------- |
290
+ |`AgentUpgradeRequiredError`| `BadRequestError` |
291
+ |`AttachmentTooLargeError`| `BadRequestError` |
292
+ |`CannotDownloadDirectoryError`| `BadRequestError` |
293
+ |`CantMoveWithMultipleLocationsError`| `BadRequestError` |
294
+ |`DatetimeParseError`| `BadRequestError` |
295
+ |`DestinationSameError`| `BadRequestError` |
296
+ |`FolderMustNotBeAFileError`| `BadRequestError` |
297
+ |`InvalidBodyError`| `BadRequestError` |
298
+ |`InvalidCursorError`| `BadRequestError` |
299
+ |`InvalidCursorTypeForSortError`| `BadRequestError` |
300
+ |`InvalidEtagsError`| `BadRequestError` |
301
+ |`InvalidFilterAliasCombinationError`| `BadRequestError` |
302
+ |`InvalidFilterCombinationError`| `BadRequestError` |
303
+ |`InvalidFilterFieldError`| `BadRequestError` |
304
+ |`InvalidFilterParamError`| `BadRequestError` |
305
+ |`InvalidFilterParamValueError`| `BadRequestError` |
306
+ |`InvalidInputEncodingError`| `BadRequestError` |
307
+ |`InvalidInterfaceError`| `BadRequestError` |
308
+ |`InvalidOauthProviderError`| `BadRequestError` |
309
+ |`InvalidPathError`| `BadRequestError` |
310
+ |`InvalidReturnToUrlError`| `BadRequestError` |
311
+ |`InvalidUploadOffsetError`| `BadRequestError` |
312
+ |`InvalidUploadPartGapError`| `BadRequestError` |
313
+ |`InvalidUploadPartSizeError`| `BadRequestError` |
314
+ |`MethodNotAllowedError`| `BadRequestError` |
315
+ |`NoValidInputParamsError`| `BadRequestError` |
316
+ |`PartNumberTooLargeError`| `BadRequestError` |
317
+ |`PathCannotHaveTrailingWhitespaceError`| `BadRequestError` |
318
+ |`ReauthenticationNeededFieldsError`| `BadRequestError` |
319
+ |`RequestParamsContainInvalidCharacterError`| `BadRequestError` |
320
+ |`RequestParamsInvalidError`| `BadRequestError` |
321
+ |`RequestParamsRequiredError`| `BadRequestError` |
322
+ |`SearchAllOnChildPathError`| `BadRequestError` |
323
+ |`UnsupportedCurrencyError`| `BadRequestError` |
324
+ |`UnsupportedHttpResponseFormatError`| `BadRequestError` |
325
+ |`UnsupportedMediaTypeError`| `BadRequestError` |
326
+ |`UserIdInvalidError`| `BadRequestError` |
327
+ |`UserIdOnUserEndpointError`| `BadRequestError` |
328
+ |`UserRequiredError`| `BadRequestError` |
329
+ |`AdditionalAuthenticationRequiredError`| `NotAuthenticatedError` |
330
+ |`AuthenticationRequiredError`| `NotAuthenticatedError` |
331
+ |`BundleRegistrationCodeFailedError`| `NotAuthenticatedError` |
332
+ |`FilesAgentTokenFailedError`| `NotAuthenticatedError` |
333
+ |`InboxRegistrationCodeFailedError`| `NotAuthenticatedError` |
334
+ |`InvalidCredentialsError`| `NotAuthenticatedError` |
335
+ |`InvalidOauthError`| `NotAuthenticatedError` |
336
+ |`InvalidOrExpiredCodeError`| `NotAuthenticatedError` |
337
+ |`InvalidSessionError`| `NotAuthenticatedError` |
338
+ |`InvalidUsernameOrPasswordError`| `NotAuthenticatedError` |
339
+ |`LockedOutError`| `NotAuthenticatedError` |
340
+ |`LockoutRegionMismatchError`| `NotAuthenticatedError` |
341
+ |`OneTimePasswordIncorrectError`| `NotAuthenticatedError` |
342
+ |`TwoFactorAuthenticationErrorError`| `NotAuthenticatedError` |
343
+ |`TwoFactorAuthenticationSetupExpiredError`| `NotAuthenticatedError` |
344
+ |`ApiKeyIsDisabledError`| `NotAuthorizedError` |
345
+ |`ApiKeyIsPathRestrictedError`| `NotAuthorizedError` |
346
+ |`ApiKeyOnlyForDesktopAppError`| `NotAuthorizedError` |
347
+ |`ApiKeyOnlyForMobileAppError`| `NotAuthorizedError` |
348
+ |`ApiKeyOnlyForOfficeIntegrationError`| `NotAuthorizedError` |
349
+ |`BillingPermissionRequiredError`| `NotAuthorizedError` |
350
+ |`BundleMaximumUsesReachedError`| `NotAuthorizedError` |
351
+ |`CannotLoginWhileUsingKeyError`| `NotAuthorizedError` |
352
+ |`CantActForOtherUserError`| `NotAuthorizedError` |
353
+ |`ContactAdminForPasswordChangeHelpError`| `NotAuthorizedError` |
354
+ |`FilesAgentFailedAuthorizationError`| `NotAuthorizedError` |
355
+ |`FolderAdminOrBillingPermissionRequiredError`| `NotAuthorizedError` |
356
+ |`FolderAdminPermissionRequiredError`| `NotAuthorizedError` |
357
+ |`FullPermissionRequiredError`| `NotAuthorizedError` |
358
+ |`HistoryPermissionRequiredError`| `NotAuthorizedError` |
359
+ |`InsufficientPermissionForParamsError`| `NotAuthorizedError` |
360
+ |`InsufficientPermissionForSiteError`| `NotAuthorizedError` |
361
+ |`MustAuthenticateWithApiKeyError`| `NotAuthorizedError` |
362
+ |`NeedAdminPermissionForInboxError`| `NotAuthorizedError` |
363
+ |`NonAdminsMustQueryByFolderOrPathError`| `NotAuthorizedError` |
364
+ |`NotAllowedToCreateBundleError`| `NotAuthorizedError` |
365
+ |`PasswordChangeNotRequiredError`| `NotAuthorizedError` |
366
+ |`PasswordChangeRequiredError`| `NotAuthorizedError` |
367
+ |`ReadOnlySessionError`| `NotAuthorizedError` |
368
+ |`ReadPermissionRequiredError`| `NotAuthorizedError` |
369
+ |`ReauthenticationFailedError`| `NotAuthorizedError` |
370
+ |`ReauthenticationFailedFinalError`| `NotAuthorizedError` |
371
+ |`ReauthenticationNeededActionError`| `NotAuthorizedError` |
372
+ |`RecaptchaFailedError`| `NotAuthorizedError` |
373
+ |`SelfManagedRequiredError`| `NotAuthorizedError` |
374
+ |`SiteAdminRequiredError`| `NotAuthorizedError` |
375
+ |`SiteFilesAreImmutableError`| `NotAuthorizedError` |
376
+ |`TwoFactorAuthenticationRequiredError`| `NotAuthorizedError` |
377
+ |`UserIdWithoutSiteAdminError`| `NotAuthorizedError` |
378
+ |`WriteAndBundlePermissionRequiredError`| `NotAuthorizedError` |
379
+ |`WritePermissionRequiredError`| `NotAuthorizedError` |
380
+ |`ZipDownloadIpMismatchError`| `NotAuthorizedError` |
381
+ |`ApiKeyNotFoundError`| `NotFoundError` |
382
+ |`BundlePathNotFoundError`| `NotFoundError` |
383
+ |`BundleRegistrationNotFoundError`| `NotFoundError` |
384
+ |`CodeNotFoundError`| `NotFoundError` |
385
+ |`FileNotFoundError`| `NotFoundError` |
386
+ |`FileUploadNotFoundError`| `NotFoundError` |
387
+ |`FolderNotFoundError`| `NotFoundError` |
388
+ |`GroupNotFoundError`| `NotFoundError` |
389
+ |`InboxNotFoundError`| `NotFoundError` |
390
+ |`NestedNotFoundError`| `NotFoundError` |
391
+ |`PlanNotFoundError`| `NotFoundError` |
392
+ |`SiteNotFoundError`| `NotFoundError` |
393
+ |`UserNotFoundError`| `NotFoundError` |
394
+ |`AlreadyCompletedError`| `ProcessingFailureError` |
395
+ |`AutomationCannotBeRunManuallyError`| `ProcessingFailureError` |
396
+ |`BehaviorNotAllowedOnRemoteServerError`| `ProcessingFailureError` |
397
+ |`BundleOnlyAllowsPreviewsError`| `ProcessingFailureError` |
398
+ |`BundleOperationRequiresSubfolderError`| `ProcessingFailureError` |
399
+ |`CouldNotCreateParentError`| `ProcessingFailureError` |
400
+ |`DestinationExistsError`| `ProcessingFailureError` |
401
+ |`DestinationFolderLimitedError`| `ProcessingFailureError` |
402
+ |`DestinationParentConflictError`| `ProcessingFailureError` |
403
+ |`DestinationParentDoesNotExistError`| `ProcessingFailureError` |
404
+ |`ExpiredPrivateKeyError`| `ProcessingFailureError` |
405
+ |`ExpiredPublicKeyError`| `ProcessingFailureError` |
406
+ |`ExportFailureError`| `ProcessingFailureError` |
407
+ |`ExportNotReadyError`| `ProcessingFailureError` |
408
+ |`FailedToChangePasswordError`| `ProcessingFailureError` |
409
+ |`FileLockedError`| `ProcessingFailureError` |
410
+ |`FileNotUploadedError`| `ProcessingFailureError` |
411
+ |`FilePendingProcessingError`| `ProcessingFailureError` |
412
+ |`FileProcessingErrorError`| `ProcessingFailureError` |
413
+ |`FileTooBigToDecryptError`| `ProcessingFailureError` |
414
+ |`FileTooBigToEncryptError`| `ProcessingFailureError` |
415
+ |`FileUploadedToWrongRegionError`| `ProcessingFailureError` |
416
+ |`FilenameTooLongError`| `ProcessingFailureError` |
417
+ |`FolderLockedError`| `ProcessingFailureError` |
418
+ |`FolderNotEmptyError`| `ProcessingFailureError` |
419
+ |`HistoryUnavailableError`| `ProcessingFailureError` |
420
+ |`InvalidBundleCodeError`| `ProcessingFailureError` |
421
+ |`InvalidFileTypeError`| `ProcessingFailureError` |
422
+ |`InvalidFilenameError`| `ProcessingFailureError` |
423
+ |`InvalidPriorityColorError`| `ProcessingFailureError` |
424
+ |`InvalidRangeError`| `ProcessingFailureError` |
425
+ |`ModelSaveErrorError`| `ProcessingFailureError` |
426
+ |`MultipleProcessingErrorsError`| `ProcessingFailureError` |
427
+ |`PathTooLongError`| `ProcessingFailureError` |
428
+ |`RecipientAlreadySharedError`| `ProcessingFailureError` |
429
+ |`RemoteServerErrorError`| `ProcessingFailureError` |
430
+ |`ResourceLockedError`| `ProcessingFailureError` |
431
+ |`SubfolderLockedError`| `ProcessingFailureError` |
432
+ |`TwoFactorAuthenticationCodeAlreadySentError`| `ProcessingFailureError` |
433
+ |`TwoFactorAuthenticationCountryBlacklistedError`| `ProcessingFailureError` |
434
+ |`TwoFactorAuthenticationGeneralErrorError`| `ProcessingFailureError` |
435
+ |`TwoFactorAuthenticationUnsubscribedRecipientError`| `ProcessingFailureError` |
436
+ |`UpdatesNotAllowedForRemotesError`| `ProcessingFailureError` |
437
+ |`DuplicateShareRecipientError`| `RateLimitedError` |
438
+ |`ReauthenticationRateLimitedError`| `RateLimitedError` |
439
+ |`TooManyConcurrentLoginsError`| `RateLimitedError` |
440
+ |`TooManyConcurrentRequestsError`| `RateLimitedError` |
441
+ |`TooManyLoginAttemptsError`| `RateLimitedError` |
442
+ |`TooManyRequestsError`| `RateLimitedError` |
443
+ |`TooManySharesError`| `RateLimitedError` |
444
+ |`AgentUnavailableError`| `ServiceUnavailableError` |
445
+ |`AutomationsUnavailableError`| `ServiceUnavailableError` |
446
+ |`MigrationInProgressError`| `ServiceUnavailableError` |
447
+ |`SiteDisabledError`| `ServiceUnavailableError` |
448
+ |`UploadsUnavailableError`| `ServiceUnavailableError` |
449
+ |`AccountAlreadyExistsError`| `SiteConfigurationError` |
450
+ |`AccountOverdueError`| `SiteConfigurationError` |
451
+ |`NoAccountForSiteError`| `SiteConfigurationError` |
452
+ |`SiteWasRemovedError`| `SiteConfigurationError` |
453
+ |`TrialExpiredError`| `SiteConfigurationError` |
454
+ |`TrialLockedError`| `SiteConfigurationError` |
455
+ |`UserRequestsEnabledRequiredError`| `SiteConfigurationError` |
456
+
457
+ ## Examples
458
+
459
+ ### File Operations
460
+
461
+ This SDK allows both file based transfer and data based transfer. Please see the examples below.
462
+
463
+ #### File Download
464
+
465
+ The second parameter is optional and will simply use the remote filename by default.
466
+
467
+ ```python
468
+ files_sdk.file.download_file("/remote.txt", "local.txt")
469
+ ```
470
+
471
+ #### File Upload
472
+
473
+ The second parameter is optional and will simply use the local filename by default.
474
+
475
+ ```python
476
+ files_sdk.file.upload_file("local.txt", "/remote.txt")
477
+ ```
478
+
479
+ If the parent directories do not already exist, they can be automatically created by passing
480
+ `mkdir_parents` in the `params`.
481
+
482
+ ```python
483
+ files_sdk.file.upload_file("local.txt", "/uploads/remote.txt", params={"mkdir_parents": True})
484
+ ```
485
+
486
+ #### List root folder
487
+
488
+ ```python
489
+ for f in files_sdk.folder.list_for("/").auto_paging_iter():
490
+ print(f.type, f.path)
491
+ ```
492
+
493
+ #### Writing a file example (string)
494
+
495
+ ```python
496
+ with files_sdk.file.open("foo.txt", 'w') as f:
497
+ f.write("contents")
498
+ ```
499
+
500
+ #### Writing a file example (binary)
501
+
502
+ ```python
503
+ with files_sdk.file.open("foo.txt", 'wb') as f:
504
+ f.write(b"contents")
505
+ ```
506
+
507
+ #### Reading a file example (string)
508
+
509
+ ```python
510
+ with files_sdk.open("foo.txt", 'r') as f:
511
+ print(f.read())
512
+ ```
513
+
514
+ #### Reading a file example (binary)
515
+
516
+ ```python
517
+ with files_sdk.open("foo.txt", 'rb') as f:
518
+ print(f.read())
519
+ ```
520
+
521
+ ### List Responses and Cursor Paging
522
+
523
+ List responses for APIs with cursor support will return an iterable object
524
+ which contains a single page of records. It has a built-in `auto_paging_iter`
525
+ method to iterate through the pages, making the additional API calls
526
+ as needed.
527
+
528
+ #### Iterating with with auto_paging_iter
529
+
530
+ ```python
531
+ list_obj = files_sdk.folder.list_for('/')
532
+
533
+ for f in list_obj.auto_paging_iter():
534
+ print(f.type, f.path)
535
+ ```
536
+
537
+ #### Iterating manually
538
+
539
+ ```python
540
+ list_obj = files_sdk.folder.list_for('/')
541
+
542
+ for f in list_obj:
543
+ print(f.type, f.path)
544
+
545
+ while list_obj.has_next_page:
546
+ list_obj.load_next_page()
547
+ for f in list_obj:
548
+ print(f.type, f.path)
549
+ ```
550
+
551
+ ### Comparing Case insensitive files and paths
552
+
553
+ For related documentation see [Case Sensitivity Documentation](https://www.files.com/docs/files-and-folders/file-system-semantics/case-sensitivity).
554
+
555
+ ```python
556
+ if files_sdk.path_util.is_same("Fïłèńämê.Txt", "filename.txt"):
557
+ print("Paths are the same")
558
+ ```
559
+
560
+ ## Mock Server
561
+
562
+ Files.com publishes a Files.com API server, which is useful for testing your use of the Files.com
563
+ SDKs and other direct integrations against the Files.com API in an integration test environment.
564
+
565
+ It is a Ruby app that operates as a minimal server for the purpose of testing basic network
566
+ operations and JSON encoding for your SDK or API client. It does not maintain state and it does not
567
+ deeply inspect your submissions for correctness.
568
+
569
+ Eventually we will add more features intended for integration testing, such as the ability to
570
+ intentionally provoke errors.
571
+
572
+ Download the server as a Docker image via [Docker Hub](https://hub.docker.com/r/filescom/files-mock-server).
573
+
574
+ The Source Code is also available on [GitHub](https://github.com/Files-com/files-mock-server).
575
+
576
+ A README is available on the GitHub link.
@@ -3,7 +3,6 @@ import files_sdk.models.account_line_item as account_line_item
3
3
  import files_sdk.models.action as action
4
4
  import files_sdk.models.action_notification_export as action_notification_export
5
5
  import files_sdk.models.action_notification_export_result as action_notification_export_result
6
- import files_sdk.models.action_webhook_failure as action_webhook_failure
7
6
  import files_sdk.models.api_key as api_key
8
7
  import files_sdk.models.api_request_log as api_request_log
9
8
  import files_sdk.models.app as app
@@ -103,7 +102,6 @@ from files_sdk.models.action_notification_export import (
103
102
  from files_sdk.models.action_notification_export_result import (
104
103
  ActionNotificationExportResult,
105
104
  )
106
- from files_sdk.models.action_webhook_failure import ActionWebhookFailure
107
105
  from files_sdk.models.api_key import ApiKey
108
106
  from files_sdk.models.api_request_log import ApiRequestLog
109
107
  from files_sdk.models.app import App
@@ -206,7 +204,7 @@ session_id = None
206
204
  source_ip = None
207
205
  base_url = "https://app.files.com"
208
206
  base_path = "api/rest/v1"
209
- version = "1.4.112"
207
+ version = "1.4.114"
210
208
 
211
209
  __version__ = version
212
210
 
@@ -6,7 +6,6 @@ from files_sdk.models.action_notification_export import (
6
6
  from files_sdk.models.action_notification_export_result import (
7
7
  ActionNotificationExportResult,
8
8
  )
9
- from files_sdk.models.action_webhook_failure import ActionWebhookFailure
10
9
  from files_sdk.models.api_key import ApiKey
11
10
  from files_sdk.models.api_request_log import ApiRequestLog
12
11
  from files_sdk.models.app import App
@@ -376,7 +376,7 @@ class File:
376
376
  )
377
377
  return response.data
378
378
 
379
- # Begin file upload
379
+ # Begin File Upload
380
380
  #
381
381
  # Parameters:
382
382
  # mkdir_parents - boolean - Create parent directories if they do not exist?
@@ -669,7 +669,7 @@ def move(path, params=None, options=None):
669
669
  return FileAction(response.data, options)
670
670
 
671
671
 
672
- # Begin file upload
672
+ # Begin File Upload
673
673
  #
674
674
  # Parameters:
675
675
  # mkdir_parents - boolean - Create parent directories if they do not exist?
@@ -10,7 +10,7 @@ from files_sdk.error import ( # noqa: F401
10
10
  class FileAction:
11
11
  default_attributes = {
12
12
  "status": None, # string - Status of file operation.
13
- "file_migration_id": None, # int64 - If status is pending, this is the id of the FileMigration to check for status updates.
13
+ "file_migration_id": None, # int64 - If status is pending, this is the id of the File Migration to check for status updates.
14
14
  "path": None,
15
15
  "destination": None,
16
16
  }
@@ -10,7 +10,7 @@ from files_sdk.error import ( # noqa: F401
10
10
 
11
11
  class SftpHostKey:
12
12
  default_attributes = {
13
- "id": None, # int64 - Sftp Host Key ID
13
+ "id": None, # int64 - SFTP Host Key ID
14
14
  "name": None, # string - The friendly name of this SFTP Host Key.
15
15
  "fingerprint_md5": None, # string - MD5 Fingerpint of the public key
16
16
  "fingerprint_sha256": None, # string - SHA256 Fingerpint of the public key