Baserow OpenAPI Python SDK
Project description
Baserowsdk
Requirements
python3.8 +
Installation
pip install --upgrade baserowsdk
Getting started
初始化客户端
from baserowsdk import Client
client = Client(
api_key="your_api_key",
base_url="http://your.baserow.domain"
)
获取字段信息
# 获取表的所有字段定义
fields = client.fields(table_id=182)
print(fields)
查询数据
# 单条查询
base = client.base(39)
row = base.table(182).row(row_id=1)
print(row)
# 批量查询
rows = base.table(182).select(page_size=100)
print(rows)
创建数据
# 创建新记录
row = client.base(39).table(182).create(
fields={"黑话改写_输入": "1234567890","黑话改写_输出": "1234567890"}
)
print(row)
更新数据
# 更新记录
updated_row = client.base(39).table(182).update(
row_id=6,
fields={
"执行批次ID": "BATCH-001",
"测试用例": [1, 2, 3] # 关联字段支持多值
},
user_field_names=True # 使用用户定义的字段名
)
print(updated_row)
删除数据
# 删除记录
client.base(39).table(182).delete(row_id=7)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
baserowsdk-0.0.6.tar.gz
(6.5 kB
view details)
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 baserowsdk-0.0.6.tar.gz.
File metadata
- Download URL: baserowsdk-0.0.6.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/23.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
963f6fe8964f732a74862b0db07d469ceeee5b60a677f8fce3e0d800ee7b38f6
|
|
| MD5 |
60131ecd25a12a4188b3bb298d4e3955
|
|
| BLAKE2b-256 |
3a641c2c88f885b7b1f1497d5548738a57ce6df7b8880c83a794e3cf5e9692ec
|
File details
Details for the file baserowsdk-0.0.6-py3-none-any.whl.
File metadata
- Download URL: baserowsdk-0.0.6-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/23.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccbc6954bb73995962fa3a9a64db5bcf8700ecea167e1f787f30f9b22c7cbcf4
|
|
| MD5 |
39ed15f1523f80b78be0d56f7274aa86
|
|
| BLAKE2b-256 |
2e8971a0f8a63ceed755c75b5cf13d230afe29f425328ef349a1177e00fbd90e
|