Python Baserow client

I recently discovered this awesome Python Baserow API client library and I wanted to share it here. You can use it to easily query your tables via the REST API.

The repository can be found here: https://github.com/NiklasRosenstein/python-baserow-client

The documentation can be found here: python-baserow-client

Install via pip: pip install baserow-client

An example of the possibilities:

from baserow.client import BaserowClient

client = BaserowClient('https://baserow.io', jwt='...')

for db in client.list_all_applications():
    print(db, [t.name for t in db.tables])

for table in client.list_database_tables(13):
    print(table)

is_john_smith = Column('field_281').equal('John Smith')
page = client.list_database_table_rows(45, filter=[is_john_smith])
print(page.results)

client.create_database_table_row(45, {
    'field_281': 'Alice Doe',
    'field_293': 'alice@doe.org',
})
2 Likes

What do you think of my idea @bram ?

Could create an api server in python with this library, that’s amazing. Then I use axios or express in native react and so I have a version of baserow mobile; D

mvc


from baserow.client import BaserowClient

client = BaserowClient('https://baserow.io', jwt='...')

def listAllApplications():
      for db in client.list_all_applications():
        print(db, [t.name for t in db.tables])

def listDatabaseTables(idUser): #id=>13
    for table in client.list_database_tables(idUser):
       print(table)

def pageResults(field, equalName, rowId):#field 'field_281'|equal => John Smith|rowId: 45 
    is_john_smith = Column(field).equal(equalName)
    page = client.list_database_table_rows(rowId, filter=[is_john_smith])
    print(page.results)

def createDatabaseTableRow(idUser, field): # id=> 45
   client.create_database_table_row(idUser, {
      'field_281': field, # field_281: 'Alice Doe'
    })
 

# my api server restfull localhost inspire in github-api
# https://api.baserow.com/<jwt-token>/listAll
# https://api.baserow.com/<jwt-token>/listAllApplications
# https://api.baserow.com/<jwt-token>/listDatabaseTables
# https://api.baserow.com/<jwt-token>/pageResults
# https://api.baserow.com/<jwt-token>/createDatabaseTableRow 
// my api server restfull client in react native/vuejs-native
var listAll = "https://api.baserow.com/<jwt-token>/listAll" // return json(method get)
var listAllApplications =  "https://api.baserow.com/<jwt-token>/listAllApplications"  // return json(method get)
var listDatabaseTables = "https://api.baserow.com/<jwt-token>/listDatabaseTables/idUser"  // return json(method get)
var pageResults = "https://api.baserow.com/<jwt-token>/pageResults/field/equalName/rowId" // return json(method get)
var createDatabaseTableRow = "https://api.baserow.com/<jwt-token>/createDatabaseTableNow/idUser/field"  // return json(method post)

cases


const between =(min, max)=> {  
  return Math.floor(Math.random() * (max - min) + min)
}

createDatabaseTableRow  return json =: { idUser: between(10, 1000) "property": "value" }

references, links

That is something that you can do @jamesgsbraves, but my first question would be why you would want to have a proxy between Baserow and your mobile version of Baserow? Would it not be more efficient to have your mobile version connect directly to the Baserow API?