New submission from Kerrick Staley <kerr...@kerrickstaley.com>:
It would be useful to provide a wrapper (in the Python sqlite3 stdlib module) for the sqlite3_serialize API. This API allows you to get a database's content as a byte string, as if you had called open('foo.sqlite3', 'rb').read(). sqlite3_serialize can even be used for :memory: databases, which I think is the most interesting use-case. Concretely, I'd propose adding a .serialize() method on sqlite3.Connection objects that returns a bytes object representing the serialized database. It would be similar to the .iterdump() method except that it would use the binary format instead of the text format, and it would return all the data at once instead of an iterator (because that's how the underlying sqlite API works). ---------- components: Library (Lib) messages: 377935 nosy: Kerrick Staley priority: normal severity: normal status: open title: Wrap sqlite3_serialize API in sqlite3 module type: enhancement _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41930> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com