Skip to main content

API client for Baserow

Project description

flake8 Lint Test codecov PyPI version

acdh-baserow-pyutils

a python client for baserow

install

pip install acdh-baserow-pyutils

how to use

Have a look into tests/test_baserow_client.py

dump all tables of a given database into JSON-FILES

import os
from acdh_baserow_pyutils import BaseRowClient

# store baserow credentials as ENV-Variables
BASEROW_USER = os.environ.get("BASEROW_USER")
BASEROW_PW = os.environ.get("BASEROW_PW")
BASEROW_TOKEN = os.environ.get("BASEROW_TOKEN") # you need to create a token via baserow
DATABASE_ID = "41426" # you can get this ID from Baserow
BASEROW_URL="https://my-custom-baserow/api/

# initialize the client to baserows hosted instance
br_client = BaseRowClient(BASEROW_USER, BASEROW_PW, BASEROW_TOKEN)

# to initialize the client to some other baserow instance, you need to pass in br_base_url=BASEROW_URL

br_client = BaseRowClient(BASEROW_USER, BASEROW_PW, BASEROW_TOKEN, br_base_url="https://api.baserow.io/api/",)


# writes all tables from Database as json.files into a folder 'out' (the folder needs to exist!) and returns a list of the file names
files = br_client.dump_tables_as_json(DATABASE_ID, folder_name='out')
print(files)
# ['out/place.json', 'out/person.json', 'out/profession.json']

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

acdh_baserow_pyutils-0.11.1.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

acdh_baserow_pyutils-0.11.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file acdh_baserow_pyutils-0.11.1.tar.gz.

File metadata

  • Download URL: acdh_baserow_pyutils-0.11.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for acdh_baserow_pyutils-0.11.1.tar.gz
Algorithm Hash digest
SHA256 15ab3805f09faa8e6bcdc3466436ff6dbf6e9fe7adeb360f691fb1ac626c9059
MD5 1f0d8ecd83ba2bb5d69e1eb1aa60e79b
BLAKE2b-256 abb2e25cfabb6880f6e24dd72b4d987bd09c478311d3ac05d3f395765b8e4f65

See more details on using hashes here.

File details

Details for the file acdh_baserow_pyutils-0.11.1-py3-none-any.whl.

File metadata

  • Download URL: acdh_baserow_pyutils-0.11.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for acdh_baserow_pyutils-0.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a7e4aff8dfbaa718b5a9704b702c560fb93c4494cc8d1030d2a2530d12db8d3d
MD5 ae2a49368762f16ebfc546ecb4b7c36d
BLAKE2b-256 c35396e45041e589088de0590c05688e7337e842d5b628f78c8e3bf9aff7d6cc

See more details on using hashes here.

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