Repl.it Database / External use
Hello, I want to migrate my discord bots to running on my personal local server, however I still want to use an online database.
I've had good luck with using the replit database, and I know how to get the URL of it, but how can I interact with my database on my computer within an async python script?
I do not want to use pickle or a local JSON (I can use a local JSON if there are no other options). My only intention with the database is to overwrite it with the local one, as to save it to the cloud.
Start with this in a Repl (replit):
from os import getenv print(getenv("REPLIT_DB_URL"))
Now that we have your db url, use this in your computer's IDE:
from os import environ environ["REPLIT_DB_URL"] = "<INSERT YOUR DB URL FROM ABOVE HERE>" from replit import db
You can now use it on your local machine with that file.