The idea would be to zip my unprotected DB into a protected zip file as it seems I can do that ( link). This link mentions that the zipfile module does not support encryption but it’s not clear if encryption refers to the SQLite3 database or to the zip file. Is there another portable database that exists allowing me to protect it with a password and still get access to Python?Īnother idea that I have in mind in order to troubleshoot my problem is to use the zipfile library. My next question will be maybe too broadly and I apology in advance. A library calls pysqlcipher exists but only for Python 2.7. ![]() I am developing an application with Python 3 requiring a pre-populated database but this database needs to be protected with a password.Īfter extensive research, it seems complicated to connect an encrypted SQLite3 database via Python 3. Here a brief summary of what I try to achieve. How can I pass the password in order to connect with my db via Python? I get this error: sqlite3.DatabaseError: file is encrypted or is not a database If I run the following code: conn=nnect("mydatabase.db") My SQLite3 database has been encrypted with SQLCipher (see image). I tried the following code: conn=nnect("mydatabase.db", Password="test") In order to connect to my database via Python, I need to provide the password but I can't figure out how to do that. © 2023 HyperObjc.I created a SQLite3 database and protected it with a password ("test") thanks to the application DB browser for SQLite. Have any questions or feature requests? Please feel free to create an issue.
0 Comments
Leave a Reply. |