Awesome simple_baserow_api created by KuechlerO
Project description
simple_baserow_api
A Baserow API wrapper for Python: simple_baserow_api created by KuechlerO
For a detailed documentation, please visit the simple_baserow_api documentation.
Install it from PyPI
pip install simple_baserow_api
Usage
Initialize the API
from simple_baserow_api import BaserowApi
# Initialize the API
api = BaserowApi(database_url="https://your-baserow-instance.com", token="your-token")
Retrieve data from a table
Get all field / column specifications for a table
# Get fields (i.e. columns) for a table
fields = api.get_fields(table_id=1)
print(fields)
Output
[
{
"id": 1,
"table_id": 1,
"name": "Name",
"order": 0,
"type": "text",
"primary": True,
"read_only": False,
"description": None,
"text_default": ""
},
...
]
Get all writable fields for a table
Some fields are read-only and cannot be written to (e.g. primary key fields and formula fields). Thus, it is important to know which fields are writable. This is useful when you want to add a new row to a table.
# Get writable fields (i.e. columns) for a table
fields = api.get_writable_fields(table_id=1)
print(fields)
Output
[
{
"id": 1,
"table_id": 1,
"name": "Name",
"order": 0,
"type": "text",
"primary": True,
"read_only": False,
"description": None,
"text_default": ""
},
...
]
Get all data from a table
Get all data from a table. This is useful when you want to retrieve all data from a table.
# Get data from a table
data = api.get_data(table_id=1, writable_only=True)
print(data)
Output
[
{
"id": 1,
"field_name": "value",
...
},
...
]
Get a single row from a table
Get a single row from a table. This is useful when you want to retrieve a specific row from a table.
# Get a single row from a table
row = api.get_entry(table_id=1, row_id=1)
print(row)
Output
{
"id": 1,
"field_name": "value",
...
}
Add / change data in a table
Add a new row to a table.
# Add a new row to a table
row_id = api.add_data(table_id=1, data={"field_name": "value"})
# Change a row in a table
row_id = api.add_data(table_id=1, row_id=1, data={"field_name": "value"})
Add / change multiple rows in a table
Add multiple new rows to a table.
# Add multiple new rows to a table
row_ids, errors = api.add_data_batch(table_id=1, entries=[{"field_name": "value"}, {"field_name": "value"}], fail_on_error=True)
# Change multiple rows in a table (by providing row_id)
row_ids, errors = api.add_data_batch(table_id=1, entries=[{"id": 1, "field_name": "value"}, {"id": 2, "field_name": "value"}], fail_on_error=True)
Development
Read the CONTRIBUTING.md file.
Thank you for using simple_baserow_api! If you encounter any issues or have any questions, please open an issue on our GitHub repository.
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
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 simple_baserow_api-0.1.4.tar.gz.
File metadata
- Download URL: simple_baserow_api-0.1.4.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37564b4bde657f88f4a6caa37765194d7613a6c3772d664fc86278c715ddb43e
|
|
| MD5 |
5bb77bfa179ca7e6034168d8146b69a9
|
|
| BLAKE2b-256 |
e1ae2ce47a407a3504657cc1128b14c783d1ebc779a53b170ab057c7b2f358ed
|
Provenance
The following attestation bundles were made for simple_baserow_api-0.1.4.tar.gz:
Publisher:
release.yml on KuechlerO/simple_baserow_api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simple_baserow_api-0.1.4.tar.gz -
Subject digest:
37564b4bde657f88f4a6caa37765194d7613a6c3772d664fc86278c715ddb43e - Sigstore transparency entry: 253498076
- Sigstore integration time:
-
Permalink:
KuechlerO/simple_baserow_api@ad22099fa543c843bc5ed737ec5c736b31af9177 -
Branch / Tag:
refs/tags/v.0.1.4 - Owner: https://github.com/KuechlerO
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ad22099fa543c843bc5ed737ec5c736b31af9177 -
Trigger Event:
push
-
Statement type:
File details
Details for the file simple_baserow_api-0.1.4-py3-none-any.whl.
File metadata
- Download URL: simple_baserow_api-0.1.4-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b73e3934565d74bb08f5f5991298cd4f10dad73ce543c69fd314ea7f34eabe67
|
|
| MD5 |
4037965ba14916792c11503fa6371919
|
|
| BLAKE2b-256 |
5af8891e4a186360e7e759c074fa5e40b88fe06268352fe03cdc4ac17d5a3acf
|
Provenance
The following attestation bundles were made for simple_baserow_api-0.1.4-py3-none-any.whl:
Publisher:
release.yml on KuechlerO/simple_baserow_api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simple_baserow_api-0.1.4-py3-none-any.whl -
Subject digest:
b73e3934565d74bb08f5f5991298cd4f10dad73ce543c69fd314ea7f34eabe67 - Sigstore transparency entry: 253498077
- Sigstore integration time:
-
Permalink:
KuechlerO/simple_baserow_api@ad22099fa543c843bc5ed737ec5c736b31af9177 -
Branch / Tag:
refs/tags/v.0.1.4 - Owner: https://github.com/KuechlerO
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ad22099fa543c843bc5ed737ec5c736b31af9177 -
Trigger Event:
push
-
Statement type: