[Tutor] Create a database from api requests
Alan Gauld
alan.gauld at yahoo.co.uk
Sat May 15 17:54:22 EDT 2021
On 15/05/2021 18:58, Joao Carlos Silva de Oliveira Matos via Tutor wrote:
> results from that day on. But I am realizing that the code is taking more
> and more time to load since the amount of data only increases.
> So I need to set up a database.
Indeed. and if using Python SQLite is the obvious choice since
a) Its the simplest SQL database around
b) it uses a single file and no client.server requirements
c) Sqlite comes in the Python standard library.
The only snag is if multiple people are trying to update
it at the same time, in which case you probably need
MySql or PostGres.
But you will need to spend some time learning SQL if you
are not already familiar. There are many SQLite tutorials
on the web. One example, including how to use python is
my tutorial. Look at the section on "Working with databases"...
Accessing SQLite using SQL from Python is something we
can help with once you reach that stage.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list