A Python package to operate with Feishu/Lark bitable
Project description
python-bitable
A Python package to operate with Feishu/Lark bitable
Install
pip install bitable
Usage
Quick Start
from bitable import Table
table = Table(BASE_ID, BASE_TOKEN, 'TABLE_NAME')
# select records
records = table.select() # select all records
records = table.select({'field_name1': 'value1', 'field_name2': 'value2'}) # select with conditions
records = table.select(Greater('FieldValue', 90))
records = table.select(Or(Greater('FieldValue', 90), And({'FieldSingle': 'A'}, Contain('FieldText', 'text_value')))) # select with complex conditions
# insert records
table.insert({'field_name1': 'value1', 'field_name2': 'value2'}) # insert a record
table.insert([{'field_name1': 'value1', 'field_name2': 'value2'}, {'field_name1': 'value3', 'field_name2': 'value4'}]) # insert multiple records
# update records
table.update({'FieldMultiple': ['B', 'A'], 'FieldDate':'2024-12-21'}, where={'FieldText': 'text_value'}) # update records with where conditions
result = table.select({'FieldText': 'HelloTestUpdate'})[0]
result['FieldText'] = 'new_value'
table.update(result) # update records with record object
# delete records
self.table.delete(where={'FieldText': 'HelloDelete'}) # with where condition
result = table.select({'FieldText': 'HelloTestUpdate'})[0]
self.table.delete(results) # with selected object
Load a table
from bitable import Table
table = Table(BASE_ID, BASE_TOKEN, 'TABLE_NAME')
BASE_ID can be found at the bitable's URL after 'base/'
BASE_TOKEN can be found following these steps:
-
click the "Base extensions" icon on the top right:
-
click "Customize" on the bottom right
-
click "Get Authorization Code"
Select Records
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bitable-1.0.1.tar.gz.
File metadata
- Download URL: bitable-1.0.1.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b83897165de61da23d5465e41d7d413839bf6358640a0b98456023cc2118836
|
|
| MD5 |
ffd3dec6a49f0cf20ae087cc46cb76d6
|
|
| BLAKE2b-256 |
f26dcfd432d53c14215fb1992e106b24a359123d6100c0da473bc4f9c83609ae
|
File details
Details for the file bitable-1.0.1-py3-none-any.whl.
File metadata
- Download URL: bitable-1.0.1-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42aea1812602e5164ef9fc8fcc9e06fc52ecc100699884b23ed97f853f5aa0a3
|
|
| MD5 |
83a7c7475190eb399193f3f014e34a61
|
|
| BLAKE2b-256 |
736a2efbfc83cacbb1e36b566d9d5d48c3d6732d9dde378937c577647f504067
|