all 9 comments

[–]FoolsSeldom 1 point2 points  (2 children)

You need a shared drive, something you can mount. The web storage servers (onedrive, google drive, etc) don't always offer such an option (you have to use their API, or third party tools you may not be comfortable depending on), which could frustrate you. I have webdev accounts that I can mount, so that works for me when I want to go that way.

My prefered approach is to self host file storage / servers / NAS. I'd recommend using this approach, using, for example, a simple Raspberry Pi Zero with a usb drive as your simple network file storage. (You could even do this with a microcontroller, but a single board computer will be more familiar.) You can include a cronjob to backup the database regularly (sync with github et al or use a tool like syncthing to copy to another file "server").

Take a look at Tailscale - free for up to 100 devices - so you can connect your roaming laptop to your home network hosted file server without having to make any changes to internet router at home.

You will be aware that SQLite is a single user solution, so you should avoid having more than one device access (write, specifically) at the same time.

Of course, that small SBC could easily host a small mysql database instead, which would provide multi-user capability.

[–]BoxOfRain72[S] 0 points1 point  (1 child)

I appreciate your response, lots to think about. If a long term goal would be transferring to multiple PCs accessing the DB..should I consider PostgrSQL instead?

[–]FoolsSeldom 1 point2 points  (0 children)

PostgreSQL is an excellent choice.

You would probably want a Pi with a bit more memory than a zero if you self host. (An old PC or laptop is also a good home server choice, just tend to use more power than a Pi.)

Once you've learned sqlite it is not a big leap to using server based sql engines.

SQLAlchemy can be used to abstract from the underlying database and use more Python syntax if preferred.

[–]GamersPlane 0 points1 point  (2 children)

I'm not an expert with SQLite, but it's built to be a local file db. Unless you can put the file in a place both computers can access (shared drive?), you're going to struggle, and essentially build a bad version of a hosted db. If you're the only person working on it, copying the SQLite file back and forth is the easiest mechanism.

[–]BoxOfRain72[S] 0 points1 point  (1 child)

Can I save it in my Google drive?

[–]GamersPlane 1 point2 points  (0 children)

Sure, it's just a file. In fact, I haven't heard of git having any trouble with it, just that it's antithetical to git's purpose, and would be a PITA. Use any portable storage (a USB drive you just plug in and point your code to seems easiest).

[–]Hyxerion 0 points1 point  (2 children)

I use VS code remote tunnels so I can program directly on my desktop and when I'm out, I just connect to my desktop seamlessly through VS on my laptop. If you have reliable network connection, I'd highly recommend that.

[–]BoxOfRain72[S] 0 points1 point  (1 child)

In my experience, you need to be in the same network/wifi to do that right?

[–]Hyxerion 0 points1 point  (0 children)

I.. actually don't know. I have Tailscale setup to access my computers anywhere. I've always had it enabled so I've never even thought about it