Skip to main content

Awesome simple_baserow_api created by KuechlerO

Project description

simple_baserow_api

A lightweight Python wrapper for the Baserow REST API, developed by Oliver Kuechler, forked from xiamaz' python-baserow-simple.

📚 Full documentation available at: simple_baserow_api Documentation

🚀 Installation

pip install simple_baserow_api

🔧 Features

  • ✅ Intuitive access to Baserow tables, fields, and rows
  • 🧹 Supports reading and writing table data
  • 📄 Handles field metadata, writable fields, and batch operations
  • 🔁 Built-in logic for updating existing rows and handling read-only fields
  • 🔍 Optional linked data resolution and selective field inclusion/exclusion

🛠️ Basic Usage

1. Initialize the API

from simple_baserow_api import BaserowApi

api = BaserowApi(
    database_url="https://your-baserow-instance.com",
    token="your-api-token"
)

2. Retrieve Table Metadata

Get All Field Definitions

fields = api.get_fields(table_id=1)

Get Writable Fields (excluding read-only)

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.

writable_fields = api.get_writable_fields(table_id=1)

Output

[
    {
        "id": 1,
        "table_id": 1,
        "name": "Name",
        "order": 0,
        "type": "text",
        "primary": True,
        "read_only": False,
        "description": None,
        "text_default": ""
    },
    ...
]

3. Read Table Data

Get All Rows

rows = api.get_data(table_id=1, writable_only=True)

Get a Single Row by ID

row = api.get_entry(table_id=1, row_id=1)

Output

[
    {
        "id": 1,
        "field_name1": "value",
        "field_name2": "value",
        ...
    },
    ...
]

4. Write Data

Add a New Row

row_id = api.add_data(table_id=1, data={"field_name": "value"})

Update an Existing Row

row_id = api.add_data(table_id=1, row_id=1, data={"field_name": "new_value"})

Add or Update Multiple Rows

# No ID: new row is created; With ID: existing row is changed
entries = [
    {"field_name": "value1"},
    {"id": 2, "field_name": "updated_value2"}
]

row_ids, errors = api.add_data_batch(table_id=1, entries=entries, fail_on_error=True)

5. Advanced Options

Include or Exclude Specific Fields

# Include only selected fields
filtered_data = api.get_data(table_id=1, include=["Name", "Status"])

# Exclude specific fields
filtered_data = api.get_data(table_id=1, exclude=["InternalNotes"])

Resolve Linked Fields Automatically

row = api.get_entry(table_id=1, row_id=1, linked=True)

💻 Development

Want to contribute? See our CONTRIBUTING.md guide.


🙌 Thank you for using simple_baserow_api!
Please report bugs or request features by opening an issue on the GitHub repository.

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

simple_baserow_api-0.1.6.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_baserow_api-0.1.6-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file simple_baserow_api-0.1.6.tar.gz.

File metadata

  • Download URL: simple_baserow_api-0.1.6.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for simple_baserow_api-0.1.6.tar.gz
Algorithm Hash digest
SHA256 e992df8c86edb8df5e53ec8c1e7118199b1fa321fe67d856b2cff4d2524066e5
MD5 2f5095a86b83890199463701a9fdcd7c
BLAKE2b-256 bc025cefa3c42624cd622d61ece1355c73a6ee3e2290dcfe9ccf030b5fcc2fac

See more details on using hashes here.

Provenance

The following attestation bundles were made for simple_baserow_api-0.1.6.tar.gz:

Publisher: release.yml on KuechlerO/simple_baserow_api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simple_baserow_api-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_baserow_api-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1eb98483e0a15ae7681fb0099d5f866b7b7752d0207ffa580dcd9175ad6236bc
MD5 910e2164cb1f1af4140516aad686ec7f
BLAKE2b-256 64a0a31005514214855392c6f4b914dd301a70e962f0cc04c40c62040a1ed8ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for simple_baserow_api-0.1.6-py3-none-any.whl:

Publisher: release.yml on KuechlerO/simple_baserow_api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page