Utility functions to work with Baserow
Project description
acdh-baserow-pyutils
a python client for baserow
install
pip install acdh-baserow-client
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_utils 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
# initialize the client
br_client = BaseRowClient(BASEROW_USER, BASEROW_PW, BASEROW_TOKEN)
# 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
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
Close
Hashes for acdh_baserow_pyutils-0.7.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0f5c1222d7dce04fff4c3d4b9df5d3ce399bd59f75f87db9dca4eabb58ed0ec |
|
MD5 | 2c9a120f88a36e1e1451dadcbc68ca4a |
|
BLAKE2b-256 | 26fa20e7551010f548a8152d1bdfb727de96513b7e15346cb410835441f9b02f |
Close
Hashes for acdh_baserow_pyutils-0.7.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62b1b1ab812564cd9ba2037f3b4ee30b515e601aca3a6d0f7bef762004b50fff |
|
MD5 | dfc580e795aa17bb8630cdb2c599ea62 |
|
BLAKE2b-256 | d882a333be95483b025ff28e30659fbda6f1ff9ac8d3512704f8868b55812b6e |