Skip to main content

Awesome python_baserow_simple created by xiamaz

Project description

python-baserow-simple

This is a simple baserow API wrapper, that mainly does two things:

  • return rows with column names and selections with their labels
  • easier batch-updates accepting both existing and new rows

codecov CI

Install it from PyPI

pip install python_baserow_simple

Usage

Import the library and provide an Baserow API token with sufficient privileges.

from python_baserow_simple import BaserowApi

api = BaserowApi(database_url="URL TO BASEROW DB", token="BASEROW TOKEN")

# getting data
table_data = api.get_data(table_id="<TABLE ID>")
for entry_id, entry_data in table_data.items():
    ...


# updating entries for a table with a column named 'Name' accepting text
data = {
    "Name": "Hello World",
}
api.add_data("<TABLE ID>", data, row_id=<ROW ID>)

# multiple entries can be updated at the same time
entries = [
    {
        "id": None,  # this will create a new row
        "Name": "AAA",
    },
    {
        "id": 2,  # this will update row with baserow id 2
        "Name": "BBB",
    },
]
api.add_data_batch("<TABLE_ID>", entries)

Development

Read the CONTRIBUTING.md file.

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

python_baserow_simple-0.0.4.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

python_baserow_simple-0.0.4-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file python_baserow_simple-0.0.4.tar.gz.

File metadata

  • Download URL: python_baserow_simple-0.0.4.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for python_baserow_simple-0.0.4.tar.gz
Algorithm Hash digest
SHA256 25b072361a279e2fd82e99c610cf743ca9bd20b0418bad05112a8bab8219892f
MD5 eb9f74036d9ba51752e8ce5186c7acda
BLAKE2b-256 6030c7df15d6f29e60aca7d3cd3c0a88a616a3523103cb8a2e66257ad8b09217

See more details on using hashes here.

File details

Details for the file python_baserow_simple-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for python_baserow_simple-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 be60c7adab1cc796c9356d5c2a8a766876d8d7e58e1aa6b683fc4de91a117936
MD5 d032d20245e318e53042c21ad951121a
BLAKE2b-256 aee293cd927e65b2d9c07c498cfbb2af881d4560740c806b1ec998b0a4281097

See more details on using hashes here.

Supported by

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