While using sqlite3 from C/C++ I learned that it has a open-in-read-only mode option, which is very handy to avoid accidental data-corruption. Is there such a thing in the Python binding?
While using sqlite3 from C/C++ I learned that it has a open-in-read-only mode option, which is very handy to avoid accidental data-corruption. Is there such a thing in the Python binding?
As of Python 3.4.0 you can open the database in read only mode with the following:
db = sqlite3.connect('file:/path/to/database?mode=ro', uri=True)
Also see the documentation.