Baserow as a backend for a flask application which uses SQLAlchemy

Hi Baserow Community,

I’m looking for some suggestion/feedback about a potential use case I am considering. Is the following a sane idea? If so, any thoughts on how to proceed (I am planning on self-hosting).

I’m in the process of migrating away from a Gatsby static website which pulls its data from Airtable. This setup has all kinds of issues that are not worth getting into. I’m currently in the process of migrating this static site to a python flask web application that is backed by a postgres database. The flask app uses SQLAlchemy to handle all the database functions (defining a schema, querying the database, etc.) I have written a one-off script which pulls my data off of Airtable and adds it to postgres, maintaining the relational structure of the data. My data is highly relational. I have set up a postgres schema which does a good job at modeling the data, using my own naming conventions.

This is a great setup, but I miss the Airtable UI which is amazing. I came across Baserow and it looks amazing in that it is Airtable-like but can run off a local postgres database. My idea is to somehow set up Baserow as a UI to my existing postgres schema. I assume that Baserow has it’s own naming conventions with respect to database schemas and perhaps I’ll have to change naming convention to match the Baserow one(?)

To sum up my questions are:

  1. Is this a sane use case?
  2. If so, how should I set it up? Should I use the Airtable migration tool to do the initial migration? Can I set up Baserow to read an existing postgres database? If so how do I do this?

Thank you!

Hi @feb,

Should I use the Airtable migration tool to do the initial migration?

Yes, you can use Airtable import tool to move data from Airtable to Baserow.

Can I set up Baserow to read an existing postgres database?

Baserow can connect to an external database but it needs its own schema. You can’t just point Baserow to any Postgres tables. You will need to make changes in your Flask application to read the data in the way they are stored by Baserow.

Is this a sane use case?

As long as you make sure that your Flask app uses the same schema and prevent users in Baserow to accidentally break the schema etc. then yes, you can use Baserow this way. You can also query the data via Baserow API if you find it easier then trying to understand the schema in Postgres.

Hope this helps!