Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Databases

PYTHON EXE SQL CENTRALIZED DATABASE

I have an executable python file that I need to run out of a centralized database (sqlite3) hosted by a file server (Synology NAS). My problem is that everyone who downloads the executable creates their own database, thus information input on one device is only accessible by that same device. How could I set up the executable and database to create and use a centralized database that is accessibly by everyone running the executable? That is, if that is possible. Any suggestions would be greatly appreciated, thanks!

You asked me for help with this, but I do not have experience with Python. I cannot help with this issue.

1 Answer

Might be a bit of a hack, but potentially using something like a shared Dropbox folder or similar to just update the files in one place, might do the trick. You'd obviously need to find a way to have SQLite happily store the database in the Dropbox folder, but you might be able to get away with symlinking stuff.

Note that I haven't tried this at all, closest thing I've done to this is trying to sync databases across instances of XBMC/Kodi or my old Sublime Text user data folder.

Otherwise you'd be looking at writing up another Python app as sort of an API that will do all the database stuff based on the HTTP requests it receives, but that's obviously getting a bit more advanced.

Appreciate the feedback. Sorry for the late response. After a lot of research I came to the conclusion of postgresql data sync ($99/single business license).

Ouch, hope that's a once-off fee, but otherwise, glad you found a solution that works for you.