I want to make a project from scratch and need to use sql database only. Is there any way in which I can integrate sql database to my code on say, pythonista. If yes, then how can i access the sql db on my iPad?
Can i use replit.com for the same? I am considering to purchase pythonista if that isn’t possible.
The easiest way to use SQL in any version of Python, including Pythonista and most likely Replit, is to use SQLite. SQLite3 has been included with Python since version 2.5.
Here is a very simple example of a widget in Pythonista 3 that reads from a SQLite database of quotes and displays a random daily quote.
The important lines are:
Which makes a standard Python SQL connection to an existing database and reads all matching rows as a list. You can read more about SQLite and Python in the documentation.