Utility functions to work with Baserow
Project description
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_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.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8f0a056dc9a56158e0074f44a498a20d43e1db33c5584ab2d074b16b83268b1 |
|
MD5 | 0ed396d1ef856074aeadd6f06b94b4b0 |
|
BLAKE2b-256 | b5349cf64efff277bace4679ea5dbd6ed7e0aa0a512bcff6954d1f51440148e9 |
Close
Hashes for acdh_baserow_pyutils-0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d27788e59706a44399f84d5ca6662e86c38bb230c97bb3015e51064d2b3f4754 |
|
MD5 | b96a63d6f5d0fc24125569b356045be7 |
|
BLAKE2b-256 | a5bc6e9e692c385e7fca699fc917bc6fd18a9f2fadff6f940fb93f2a9ef05829 |