Python - delete all rows

Is there a way to truncate a table? To delete all rows without having to delete it row by row?
Thank you

You can use query API with DELETE from xxx

Hi Daniel, thank you for the tip

It works, records are deleted, but it gives error after deletion

Traceback (most recent call last):
File "", line 105, in <module>
test1 = base.query("DELETE from Edgelist")
File "/usr/local/lib/python3.7/site-packages/seatable_api/", line 795, in query
data = parse_response(response)
File "/usr/local/lib/python3.7/site-packages/seatable_api/", line 31, in parse_response
raise ConnectionError(response.status_code, response.text)
ConnectionError: [Errno 502] <html>
<head><title>502 Bad Gateway</title></head>
<center><h1>502 Bad Gateway</h1></center>

This is caused by timeout of Nginx. You can ignore the error.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.