Skip to main content

Utility functions to work with Baserow

Project description

flake8 Lint Test codecov PyPI version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

acdh_baserow_pyutils-0.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

acdh_baserow_pyutils-0.2.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

acdh_baserow_pyutils-0.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file acdh_baserow_pyutils-0.2.tar.gz.

File metadata

  • Download URL: acdh_baserow_pyutils-0.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for acdh_baserow_pyutils-0.2.tar.gz
Algorithm Hash digest
SHA256 3a5d7c2eea71ee7d201ab18472ea7d9988cefc713c57150ef726a52e1bb2ceb4
MD5 64d2de06f9a30789520d8974848fa835
BLAKE2b-256 4172defd3a2f81747caa46ff9b26b7105b628f3a64d28eeac60fe6e4ab4b7da3

See more details on using hashes here.

File details

Details for the file acdh_baserow_pyutils-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for acdh_baserow_pyutils-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 16e90530ee772ae14622baad903f6cbe8da005a6da1480736d92318cc6beadb2
MD5 30b56689fde2e084abb106cd1f49c7d7
BLAKE2b-256 c314cff1f622201cfe67a7ead94a90a74949b065435130109d471ad66bc97dc8

See more details on using hashes here.

File details

Details for the file acdh_baserow_pyutils-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for acdh_baserow_pyutils-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 13bf7c38151d7c14639065674cc27b10843bfbb01a7459f4d7ea8153394f7e51
MD5 90c471132522ff67df4fd63b5b66d80d
BLAKE2b-256 cf8dff7285b106afae86841a7aef3e9520c903aec2050b8c042e42b14f41d2ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page