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.5.tar.gz (13.7 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.5-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for simple_baserow_api-0.1.5.tar.gz
Algorithm Hash digest
SHA256 3d2df4ef9fb103fc8ac0507c7e723a70e8e28bb581751627fe798080510b3d82
MD5 f634b08c6877e720cea1d2914e4a43c3
BLAKE2b-256 1cf024467712b65eb4bc3d96d3f7473742932482dcee8f4fa638b42cb76d6c7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for simple_baserow_api-0.1.5.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.5-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_baserow_api-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e6bf0b2667e70164bceb0a7ebe599bb4200954b92099023c4631a725ada311b6
MD5 9e3d32e5fce3d3ce81d6715a7bd60568
BLAKE2b-256 363f71674c8af509b9b98179b8b30248672bfd3a286f7aa90dfb6e0a6cdf9336

See more details on using hashes here.

Provenance

The following attestation bundles were made for simple_baserow_api-0.1.5-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