Search code examples
pythonsqlitepyscript

where is the sqlite3 database created with pyscript located?


lately I created a sqlite3 database with pyscript. but when I close the browser to reopen it, I can not access the database recently created. An error message says that it does not exist. I would like to know where are stored the sqlite3 databases created with pyscript. Thank you

I would like to know where are stored the sqlite3 databases created with pyscript. Thank you


Solution

  • Your post does not show your code or how you are creating the database. If you are using standard Python APIs, the database is created in the browser's virtual file system. That file system is recreated when you refresh the page or reload the browser.

    To use a persistent filesystem, use the Pyodide FS APIs.

    Dealing with the file system