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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 221c3b9272708824c3fdc5e631a0df33f03e414f56f583e53970427bdc25c601 |
|
MD5 | 7c8b4089eb39449cc4507771d94808bd |
|
BLAKE2b-256 | dd99673c7de5857204b09e85910db49ab5a46b361a7934715de9c55e428c3f06 |
Close
Hashes for acdh_baserow_pyutils-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5ab9eced51b15a35024aa19e7a73946553a7a959e9ead9e0610815297c5452d |
|
MD5 | 32cd9d86224d9b2ce16d38113af0f13b |
|
BLAKE2b-256 | 6195be4f21f6330c48ccf36b7f8532dc0d547afb6714a802cb72dfcd8d1d023d |