Populate tinydb with information

I have a database with a list of cities, I need that data to be included in tinydb, how can I add that information to tinydb, other than doing it manually, one by one.

1.Get the list of datas from tinydb into a global variable which is initialised with create empty list

  1. Add the new items into this global variable in the same format of previous one.

  2. Save this new variable into tindydb with same name tag

I have the database of the cities in an excel, there are almost 500 cities, I need to pass that information to tinydb, for when the user downloads the application, it is already included in it and can be consulted.

Excel mean CSV file or in spreadsheet.?

If it were in online they it is very easy to use. However now actually what kind of help you are expecting??

Get the info from Excel , then save as it is in tinydb

or share us some screenshots what kind of help you are expecting from us…

yes CSV, because I needed to know which component to use, but I just checked and they advise me FILE read from file name

When screen initialise, check if the tinyDB is empty. If it is, read from the csv file using the ‘read from’ block and then store the output into the TinyDB using ‘list from csv table’ block.

blocks(12)

I use the EFile extension myself but I’m sure other file components and extensions work the same:

1 Like

Any luck with this?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.