seatable-api 2.7.2__tar.gz → 2.8.1__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 (28) hide show
  1. seatable_api-2.8.1/LICENSE +201 -0
  2. seatable_api-2.8.1/PKG-INFO +28 -0
  3. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api/api_gateway.py +51 -30
  4. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api/main.py +2 -1
  5. seatable_api-2.8.1/seatable_api.egg-info/PKG-INFO +28 -0
  6. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api.egg-info/SOURCES.txt +1 -1
  7. {seatable-api-2.7.2 → seatable_api-2.8.1}/setup.py +1 -1
  8. seatable-api-2.7.2/PKG-INFO +0 -23
  9. seatable-api-2.7.2/seatable_api/parsetab.py +0 -44
  10. seatable-api-2.7.2/seatable_api.egg-info/PKG-INFO +0 -23
  11. {seatable-api-2.7.2 → seatable_api-2.8.1}/README.md +0 -0
  12. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api/__init__.py +0 -0
  13. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api/column.py +0 -0
  14. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api/constants.py +0 -0
  15. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api/context.py +0 -0
  16. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api/convert_airtable.py +0 -0
  17. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api/date_utils.py +0 -0
  18. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api/exception.py +0 -0
  19. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api/message.py +0 -0
  20. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api/query.py +0 -0
  21. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api/socket_io.py +0 -0
  22. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api/utils.py +0 -0
  23. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api.egg-info/dependency_links.txt +0 -0
  24. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api.egg-info/requires.txt +0 -0
  25. {seatable-api-2.7.2 → seatable_api-2.8.1}/seatable_api.egg-info/top_level.txt +0 -0
  26. {seatable-api-2.7.2 → seatable_api-2.8.1}/setup.cfg +0 -0
  27. {seatable-api-2.7.2 → seatable_api-2.8.1}/tests/__init__.py +0 -0
  28. {seatable-api-2.7.2 → seatable_api-2.8.1}/tests/dateutils_test.py +0 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,28 @@
1
+ Metadata-Version: 2.1
2
+ Name: seatable-api
3
+ Version: 2.8.1
4
+ Summary: Python client for SeaTable web api
5
+ Home-page: https://github.com/seatable/seatable-api-python
6
+ Author: seatable
7
+ Author-email: support@seafile.com
8
+ License: Apache Licence
9
+ Platform: any
10
+ Classifier: Programming Language :: Python
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: requests
14
+ Requires-Dist: python-socketio<5
15
+ Requires-Dist: ply
16
+ Requires-Dist: python_dateutil
17
+
18
+ # seatable-api-python
19
+
20
+ Python client for SeaTable web api
21
+
22
+ English document: <https://seatable.github.io/seatable-scripts/>
23
+
24
+ Chinese document: <https://seatable.github.io/seatable-scripts-cn/>
25
+
26
+ pypi: <https://pypi.org/project/seatable-api/>
27
+
28
+ github: <https://github.com/seatable/seatable-api-python>
@@ -54,6 +54,9 @@ class APIGateway(object):
54
54
  def _row_link_server_url(self):
55
55
  return self.api_gateway_url + '/api/v2/dtables/' + self.dtable_uuid + '/links/'
56
56
 
57
+ def _query_links_server_url(self):
58
+ return self.api_gateway_url + '/api/v2/dtables/' + self.dtable_uuid + '/query-links/'
59
+
57
60
  def _batch_update_row_link_server_url(self):
58
61
  return self._row_link_server_url()
59
62
 
@@ -148,7 +151,7 @@ class APIGateway(object):
148
151
  response = requests.get(view_url, headers=self.headers, timeout=self.timeout)
149
152
  return parse_response(response)
150
153
 
151
-
154
+
152
155
  def add_view(self, table_name, view_name):
153
156
  url = self._view_server_url()
154
157
  view_url = '%(url)s/?table_name=%(table_name)s' % ({
@@ -161,7 +164,7 @@ class APIGateway(object):
161
164
  response = requests.post(view_url, json=json_data, headers=self.headers, timeout=self.timeout)
162
165
  return parse_response(response)
163
166
 
164
-
167
+
165
168
  def rename_view(self, table_name, view_name, new_view_name):
166
169
  url = self._view_server_url()
167
170
  view_url = '%(url)s/%(view_name)s/?table_name=%(table_name)s' % ({
@@ -175,7 +178,7 @@ class APIGateway(object):
175
178
  response = requests.put(view_url, json=json_data, headers=self.headers, timeout=self.timeout)
176
179
  return parse_response(response)
177
180
 
178
-
181
+
179
182
  def delete_view(self, table_name, view_name):
180
183
  url = self._view_server_url()
181
184
  view_url = '%(url)s/%(view_name)s/?table_name=%(table_name)s' % ({
@@ -186,7 +189,7 @@ class APIGateway(object):
186
189
  response = requests.delete(view_url, headers=self.headers, timeout=self.timeout)
187
190
  return parse_response(response)
188
191
 
189
-
192
+
190
193
  def list_rows(self, table_name, view_name=None, order_by=None, desc=False, start=None, limit=None):
191
194
  """
192
195
  :param table_name: str
@@ -199,7 +202,8 @@ class APIGateway(object):
199
202
  """
200
203
  url = self._row_server_url()
201
204
  params = {
202
- 'table_name': table_name
205
+ 'table_name': table_name,
206
+ 'convert_keys': True
203
207
  }
204
208
 
205
209
  if like_table_id(table_name):
@@ -217,7 +221,7 @@ class APIGateway(object):
217
221
  data = parse_response(response)
218
222
  return data.get('rows')
219
223
 
220
-
224
+
221
225
  def get_row(self, table_name, row_id):
222
226
  """
223
227
  :param table_name: str
@@ -226,7 +230,8 @@ class APIGateway(object):
226
230
  """
227
231
  url = self._row_server_url() + row_id + '/'
228
232
  params = {
229
- 'table_name': table_name
233
+ 'table_name': table_name,
234
+ 'convert_keys': True
230
235
  }
231
236
 
232
237
  if like_table_id(table_name):
@@ -235,7 +240,7 @@ class APIGateway(object):
235
240
  data = parse_response(response)
236
241
  return data
237
242
 
238
-
243
+
239
244
  def append_row(self, table_name, row_data, apply_default=None):
240
245
  """
241
246
  :param table_name: str
@@ -254,7 +259,7 @@ class APIGateway(object):
254
259
  data = parse_response(response)
255
260
  return data.get('first_row')
256
261
 
257
-
262
+
258
263
  def batch_append_rows(self, table_name, rows_data, apply_default=None):
259
264
  """
260
265
  :param table_name: str
@@ -272,7 +277,7 @@ class APIGateway(object):
272
277
  response = requests.post(url, json=json_data, headers=self.headers, timeout=self.timeout)
273
278
  return parse_response(response)
274
279
 
275
-
280
+
276
281
  def insert_row(self, table_name, row_data, anchor_row_id, apply_default=None):
277
282
  """
278
283
  :param table_name: str
@@ -280,7 +285,7 @@ class APIGateway(object):
280
285
  :param anchor_row_id: str
281
286
  """
282
287
  return self.append_row(table_name, row_data, apply_default=apply_default)
283
-
288
+
284
289
 
285
290
  def update_row(self, table_name, row_id, row_data):
286
291
  """
@@ -299,7 +304,7 @@ class APIGateway(object):
299
304
  response = requests.put(url, json=json_data, headers=self.headers, timeout=self.timeout)
300
305
  return parse_response(response)
301
306
 
302
-
307
+
303
308
  def batch_update_rows(self, table_name, rows_data):
304
309
  """
305
310
  :param table_name: str
@@ -316,7 +321,7 @@ class APIGateway(object):
316
321
  response = requests.put(url, json=json_data, headers=self.headers, timeout=self.timeout)
317
322
  return parse_response(response)
318
323
 
319
-
324
+
320
325
  def delete_row(self, table_name, row_id):
321
326
  """
322
327
  :param table_name: str
@@ -332,7 +337,7 @@ class APIGateway(object):
332
337
  response = requests.delete(url, json=json_data, headers=self.headers, timeout=self.timeout)
333
338
  return parse_response(response)
334
339
 
335
-
340
+
336
341
  def batch_delete_rows(self, table_name, row_ids):
337
342
  """
338
343
  :param table_name: str
@@ -348,7 +353,7 @@ class APIGateway(object):
348
353
  response = requests.delete(url, json=json_data, headers=self.headers, timeout=self.timeout)
349
354
  return parse_response(response)
350
355
 
351
-
356
+
352
357
  def filter_rows(self, table_name, filters, view_name=None, filter_conjunction='And'):
353
358
  """
354
359
  :param table_name: str
@@ -415,7 +420,7 @@ class APIGateway(object):
415
420
  response = requests.post(url, json=json_data, headers=self.headers, timeout=self.timeout)
416
421
  return parse_response(response)
417
422
 
418
-
423
+
419
424
  def remove_link(self, link_id, table_name, other_table_name, row_id, other_row_id):
420
425
  """
421
426
  :param link_id: str
@@ -438,7 +443,7 @@ class APIGateway(object):
438
443
  response = requests.delete(url, json=json_data, headers=self.headers, timeout=self.timeout)
439
444
  return parse_response(response)
440
445
 
441
-
446
+
442
447
  def update_link(self, link_id, table_name, other_table_name, row_id, other_rows_ids):
443
448
  """
444
449
  :param link_id: str
@@ -465,7 +470,7 @@ class APIGateway(object):
465
470
  response = requests.put(url, json=json_data, headers=self.headers, timeout=self.timeout)
466
471
  return parse_response(response)
467
472
 
468
-
473
+
469
474
  def batch_update_links(self, link_id, table_name, other_table_name, row_id_list, other_rows_ids_map):
470
475
  """
471
476
  :param link_id: str
@@ -490,6 +495,22 @@ class APIGateway(object):
490
495
  return parse_response(response)
491
496
 
492
497
 
498
+ def get_linked_records(self, table_id, link_column_key, rows):
499
+ """
500
+ :param table_id: str
501
+ :param link_column_key: str
502
+ :param rows: list
503
+ """
504
+ url = self._query_links_server_url()
505
+ json_data = {
506
+ 'table_id': table_id,
507
+ 'link_column_key': link_column_key,
508
+ 'rows': rows,
509
+ }
510
+ response = requests.post(url, json=json_data, headers=self.headers, timeout=self.timeout)
511
+ return parse_response(response)
512
+
513
+
493
514
  def list_columns(self, table_name, view_name=None):
494
515
  """
495
516
  :param table_name: str
@@ -508,7 +529,7 @@ class APIGateway(object):
508
529
  data = parse_response(response)
509
530
  return data.get('columns')
510
531
 
511
-
532
+
512
533
  def get_column_link_id(self, table_name, column_name):
513
534
  columns = self.list_columns(table_name)
514
535
  for column in columns:
@@ -516,14 +537,14 @@ class APIGateway(object):
516
537
  return column.get('data', {}).get('link_id')
517
538
  raise ValueError('link type column "%s" does not exist in current table' % column_name)
518
539
 
519
-
540
+
520
541
  def get_column_by_name(self, table_name, column_name):
521
542
  columns = self.list_columns(table_name)
522
543
  for col in columns:
523
544
  if col.get('name') == column_name:
524
545
  return col
525
546
 
526
-
547
+
527
548
  def get_columns_by_type(self, table_name, column_type: ColumnTypes):
528
549
  if column_type not in ColumnTypes:
529
550
  raise ValueError("type %s invalid!" % (column_type,))
@@ -531,7 +552,7 @@ class APIGateway(object):
531
552
  cols_results = [col for col in columns if col.get('type') == column_type.value]
532
553
  return cols_results
533
554
 
534
-
555
+
535
556
  def insert_column(self, table_name, column_name, column_type, column_key=None, column_data=None):
536
557
  """
537
558
  :param table_name: str
@@ -559,7 +580,7 @@ class APIGateway(object):
559
580
  data = parse_response(response)
560
581
  return data
561
582
 
562
-
583
+
563
584
  def rename_column(self, table_name, column_key, new_column_name):
564
585
  """
565
586
  :param table_name: str
@@ -580,7 +601,7 @@ class APIGateway(object):
580
601
  data = parse_response(response)
581
602
  return data
582
603
 
583
-
604
+
584
605
  def resize_column(self, table_name, column_key, new_column_width):
585
606
  """
586
607
  :param table_name: str
@@ -602,7 +623,7 @@ class APIGateway(object):
602
623
  data = parse_response(response)
603
624
  return data
604
625
 
605
-
626
+
606
627
  def freeze_column(self, table_name, column_key, frozen):
607
628
  """
608
629
  :param table_name: str
@@ -623,7 +644,7 @@ class APIGateway(object):
623
644
  data = parse_response(response)
624
645
  return data
625
646
 
626
-
647
+
627
648
  def move_column(self, table_name, column_key, target_column_key):
628
649
  """
629
650
  :param table_name: str
@@ -644,7 +665,7 @@ class APIGateway(object):
644
665
  data = parse_response(response)
645
666
  return data
646
667
 
647
-
668
+
648
669
  def modify_column_type(self, table_name, column_key, new_column_type):
649
670
  """
650
671
  :param table_name: str
@@ -667,7 +688,7 @@ class APIGateway(object):
667
688
  data = parse_response(response)
668
689
  return data
669
690
 
670
-
691
+
671
692
  def add_column_options(self, table_name, column, options):
672
693
  """
673
694
  :param table_name: str
@@ -686,7 +707,7 @@ class APIGateway(object):
686
707
  data = parse_response(response)
687
708
  return data
688
709
 
689
-
710
+
690
711
  def add_column_cascade_settings(self, table_name, child_column, parent_column, cascade_settings):
691
712
  """
692
713
 
@@ -709,7 +730,7 @@ class APIGateway(object):
709
730
  data = parse_response(response)
710
731
  return data
711
732
 
712
-
733
+
713
734
  def delete_column(self, table_name, column_key):
714
735
  """
715
736
  :param table_name: str
@@ -156,7 +156,7 @@ class SeaTableAPI(object):
156
156
 
157
157
  def _app_download_link_url(self):
158
158
  return self.server_url + '/api/v2.1/dtable/app-download-link/'
159
-
159
+
160
160
  def _app_custom_download_link_url(self):
161
161
  return self.server_url + '/api/v2.1/dtable/custom/app-download-link/'
162
162
 
@@ -722,6 +722,7 @@ class SeaTableAPI(object):
722
722
  return parse_response(response)
723
723
 
724
724
  @check_auth
725
+ @api_gateway_wrapper
725
726
  def get_linked_records(self, table_id, link_column_key, rows):
726
727
  """
727
728
  :param table_id: str
@@ -0,0 +1,28 @@
1
+ Metadata-Version: 2.1
2
+ Name: seatable-api
3
+ Version: 2.8.1
4
+ Summary: Python client for SeaTable web api
5
+ Home-page: https://github.com/seatable/seatable-api-python
6
+ Author: seatable
7
+ Author-email: support@seafile.com
8
+ License: Apache Licence
9
+ Platform: any
10
+ Classifier: Programming Language :: Python
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: requests
14
+ Requires-Dist: python-socketio<5
15
+ Requires-Dist: ply
16
+ Requires-Dist: python_dateutil
17
+
18
+ # seatable-api-python
19
+
20
+ Python client for SeaTable web api
21
+
22
+ English document: <https://seatable.github.io/seatable-scripts/>
23
+
24
+ Chinese document: <https://seatable.github.io/seatable-scripts-cn/>
25
+
26
+ pypi: <https://pypi.org/project/seatable-api/>
27
+
28
+ github: <https://github.com/seatable/seatable-api-python>
@@ -1,3 +1,4 @@
1
+ LICENSE
1
2
  README.md
2
3
  setup.py
3
4
  seatable_api/__init__.py
@@ -10,7 +11,6 @@ seatable_api/date_utils.py
10
11
  seatable_api/exception.py
11
12
  seatable_api/main.py
12
13
  seatable_api/message.py
13
- seatable_api/parsetab.py
14
14
  seatable_api/query.py
15
15
  seatable_api/socket_io.py
16
16
  seatable_api/utils.py
@@ -1,6 +1,6 @@
1
1
  from setuptools import setup, find_packages
2
2
 
3
- __version__ = '2.7.2'
3
+ __version__ = '2.8.1'
4
4
 
5
5
  with open('README.md', 'r', encoding='utf-8') as fh:
6
6
  long_description = fh.read()
@@ -1,23 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: seatable-api
3
- Version: 2.7.2
4
- Summary: Python client for SeaTable web api
5
- Home-page: https://github.com/seatable/seatable-api-python
6
- Author: seatable
7
- Author-email: support@seafile.com
8
- License: Apache Licence
9
- Description: # seatable-api-python
10
-
11
- Python client for SeaTable web api
12
-
13
- English document: <https://seatable.github.io/seatable-scripts/>
14
-
15
- Chinese document: <https://seatable.github.io/seatable-scripts-cn/>
16
-
17
- pypi: <https://pypi.org/project/seatable-api/>
18
-
19
- github: <https://github.com/seatable/seatable-api-python>
20
-
21
- Platform: any
22
- Classifier: Programming Language :: Python
23
- Description-Content-Type: text/markdown
@@ -1,44 +0,0 @@
1
-
2
- # parsetab.py
3
- # This file is automatically generated. Do not edit.
4
- # pylint: disable=W,C,R
5
- _tabversion = '3.10'
6
-
7
- _lr_method = 'LALR'
8
-
9
- _lr_signature = 'AND EQUAL GT GTE LIKE LT LTE NOT_EQUAL OR QUOTE_STRING STRINGmerge : filter AND filter\n | filter OR filter\n | merge AND filter\n | merge OR filter\n | filter\n filter : factor EQUAL factor\n | factor NOT_EQUAL factor\n | factor GTE factor\n | factor GT factor\n | factor LTE factor\n | factor LT factor\n | factor LIKE factor\n factor : QUOTE_STRING\n | STRING\n '
10
-
11
- _lr_action_items = {'QUOTE_STRING':([0,6,7,8,9,10,11,12,13,14,15,16,],[4,4,4,4,4,4,4,4,4,4,4,4,]),'STRING':([0,6,7,8,9,10,11,12,13,14,15,16,],[5,5,5,5,5,5,5,5,5,5,5,5,]),'$end':([1,2,4,5,17,18,19,20,21,22,23,24,25,26,27,],[0,-5,-13,-14,-3,-4,-1,-2,-6,-7,-8,-9,-10,-11,-12,]),'AND':([1,2,4,5,17,18,19,20,21,22,23,24,25,26,27,],[6,8,-13,-14,-3,-4,-1,-2,-6,-7,-8,-9,-10,-11,-12,]),'OR':([1,2,4,5,17,18,19,20,21,22,23,24,25,26,27,],[7,9,-13,-14,-3,-4,-1,-2,-6,-7,-8,-9,-10,-11,-12,]),'EQUAL':([3,4,5,],[10,-13,-14,]),'NOT_EQUAL':([3,4,5,],[11,-13,-14,]),'GTE':([3,4,5,],[12,-13,-14,]),'GT':([3,4,5,],[13,-13,-14,]),'LTE':([3,4,5,],[14,-13,-14,]),'LT':([3,4,5,],[15,-13,-14,]),'LIKE':([3,4,5,],[16,-13,-14,]),}
12
-
13
- _lr_action = {}
14
- for _k, _v in _lr_action_items.items():
15
- for _x,_y in zip(_v[0],_v[1]):
16
- if not _x in _lr_action: _lr_action[_x] = {}
17
- _lr_action[_x][_k] = _y
18
- del _lr_action_items
19
-
20
- _lr_goto_items = {'merge':([0,],[1,]),'filter':([0,6,7,8,9,],[2,17,18,19,20,]),'factor':([0,6,7,8,9,10,11,12,13,14,15,16,],[3,3,3,3,3,21,22,23,24,25,26,27,]),}
21
-
22
- _lr_goto = {}
23
- for _k, _v in _lr_goto_items.items():
24
- for _x, _y in zip(_v[0], _v[1]):
25
- if not _x in _lr_goto: _lr_goto[_x] = {}
26
- _lr_goto[_x][_k] = _y
27
- del _lr_goto_items
28
- _lr_productions = [
29
- ("S' -> merge","S'",1,None,None,None),
30
- ('merge -> filter AND filter','merge',3,'p_merge','query.py',161),
31
- ('merge -> filter OR filter','merge',3,'p_merge','query.py',162),
32
- ('merge -> merge AND filter','merge',3,'p_merge','query.py',163),
33
- ('merge -> merge OR filter','merge',3,'p_merge','query.py',164),
34
- ('merge -> filter','merge',1,'p_merge','query.py',165),
35
- ('filter -> factor EQUAL factor','filter',3,'p_filter','query.py',173),
36
- ('filter -> factor NOT_EQUAL factor','filter',3,'p_filter','query.py',174),
37
- ('filter -> factor GTE factor','filter',3,'p_filter','query.py',175),
38
- ('filter -> factor GT factor','filter',3,'p_filter','query.py',176),
39
- ('filter -> factor LTE factor','filter',3,'p_filter','query.py',177),
40
- ('filter -> factor LT factor','filter',3,'p_filter','query.py',178),
41
- ('filter -> factor LIKE factor','filter',3,'p_filter','query.py',179),
42
- ('factor -> QUOTE_STRING','factor',1,'p_factor','query.py',184),
43
- ('factor -> STRING','factor',1,'p_factor','query.py',185),
44
- ]
@@ -1,23 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: seatable-api
3
- Version: 2.7.2
4
- Summary: Python client for SeaTable web api
5
- Home-page: https://github.com/seatable/seatable-api-python
6
- Author: seatable
7
- Author-email: support@seafile.com
8
- License: Apache Licence
9
- Description: # seatable-api-python
10
-
11
- Python client for SeaTable web api
12
-
13
- English document: <https://seatable.github.io/seatable-scripts/>
14
-
15
- Chinese document: <https://seatable.github.io/seatable-scripts-cn/>
16
-
17
- pypi: <https://pypi.org/project/seatable-api/>
18
-
19
- github: <https://github.com/seatable/seatable-api-python>
20
-
21
- Platform: any
22
- Classifier: Programming Language :: Python
23
- Description-Content-Type: text/markdown
File without changes
File without changes