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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8437b2c11ab4070d4bf6eb334c5666461c3ccabaf1f712da2b4435f50af2d264 |
|
MD5 | 9c9c83c1aed648dfb37704058c803bb4 |
|
BLAKE2b-256 | 242d2be68022d16e0e668a80cd7c96424023ae8d064105f1701929de8c961ef8 |
Close
Hashes for acdh_baserow_pyutils-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a796aa0261711567e456edb1674198d49e8bf32332db71abd2cde974e193d96 |
|
MD5 | bedca44365940775d6180795b81071c5 |
|
BLAKE2b-256 | acd22bb8d2e97bd9188652b3b1edffd4c396e84e73b220d8d513708f6c8f8975 |