How to use the same tinydb database in more than one application


I need to share the database of an application I developed with another application I am developing.

It is possible ?
How to make?


I don’t understand what you are saying…
But as of your question title
I suggest you to make an online database [airtable, firebase] and get it on different application and store it on tinydb…
You get same tinydb value on different application

1 Like

thanks for the answer … i use this method …

However this app is to run offline, so the tinydb option.

It is an application to work in a region without internet.

Okay then please share your full concept then probably we could help

I don’t know if it’s because I’m using Google Translator, but for my understanding the concept is well defined.

But I will detail otherwise …

I have an application that will rarely enter a phone signal zone.

Because the users are rural people.

This app manages the stock of pesticides.

I am developing another application that will manage the planting part.

They are distinct applications. Distributed separately.

I need users who choose to install both applications to share the same database.

I am using TinyDB because it is an offline database.

Thanks for listening.

I think this concept works if you export tinydb all tags with value to json format or csv and save in a file in any folder from one app and you can access it from another by opening that file and store it in tinydb.


If you want that when a user enters information into that database it is also available to other users, you can’t. At some point that database has to be synchronized to make it available to all users and for that you need an Internet connection.

Now, if you need it to only be available to one user in two applications, it occurs to me that you could try to save the data in a file in the phone’s memory and then read that file with the other application and there you would have synchronized that data in both single-user apps.

I was going to suggest the same thing (in csv, to make it simpler). Of course JSON work too.
In the case of both apps being able to modify the shared information, you should also include a date/time validation in the file to be able to recognize if the file has been modified and there’s updated information or it’s not necessary to import the data, because it will overwrite the new one with old information.

1 Like