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.4.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37f9e47a6c84334c7f895d0e0d4cb75e61182a985a53b75b81e7d28a4a95b015 |
|
MD5 | 3f7e4f5248f9ad807b18c60340dc01b3 |
|
BLAKE2b-256 | d2083c469abdd6e4fec789c6f523ad92dcb91f6c5e8d065d96691f36e5fc6a9f |
Close
Hashes for acdh_baserow_pyutils-0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21e90df6ab518f7384d6eba2bae0ad74f7359802800d9e48bbc8a12ba3fce274 |
|
MD5 | bf638f5916e6e33997528a46818c504e |
|
BLAKE2b-256 | ce001a556025159b5a7b5053153f1f65b111a4a1d56d96fe8e4cf8c4c3758064 |