Popular Python recipes tagged "sqlite"http://code.activestate.com/recipes/langs/python/tags/sqlite/2016-09-29T18:04:57-07:00ActiveState Code RecipesPut Peewee ORM data to PDF with xtopdf (Python)
2016-09-29T18:04:57-07:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/580704-put-peewee-orm-data-to-pdf-with-xtopdf/
<p style="color: grey">
Python
recipe 580704
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/conversion/">conversion</a>, <a href="/recipes/tags/converter/">converter</a>, <a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/formats/">formats</a>, <a href="/recipes/tags/orm/">orm</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/pdf_generation/">pdf_generation</a>, <a href="/recipes/tags/peewee/">peewee</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/python2/">python2</a>, <a href="/recipes/tags/sqlite/">sqlite</a>, <a href="/recipes/tags/xtopdf/">xtopdf</a>).
</p>
<p>This recipe shows how some basics of how to fetch data from database tables managed by the Peewee ORM (a lightweight expressive ORM for Python) and write that data, formatted, to a PDF file. The recipe uses Python, the Peewee ORM and the xtopdf toolkit for PDF creation.</p>
Publish SQLite data to PDF using named tuples (Python)
2015-02-24T22:08:11-08:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/579027-publish-sqlite-data-to-pdf-using-named-tuples/
<p style="color: grey">
Python
recipe 579027
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/conversion/">conversion</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/pdfwriter/">pdfwriter</a>, <a href="/recipes/tags/sql/">sql</a>, <a href="/recipes/tags/sqlite/">sqlite</a>, <a href="/recipes/tags/sqlite3/">sqlite3</a>, <a href="/recipes/tags/xtopdf/">xtopdf</a>).
</p>
<p>This recipe shows how to publish SQLite data to PDF, using named tuples from the collections module of Python, the sqlite3 library, and the xtopdf library for PDF generation.</p>
A wxPython GUI To Create Sqlite3 Databases (Python)
2013-09-18T23:05:51-07:00toufic zaarourhttp://code.activestate.com/recipes/users/4187866/http://code.activestate.com/recipes/578665-a-wxpython-gui-to-create-sqlite3-databases/
<p style="color: grey">
Python
recipe 578665
by <a href="/recipes/users/4187866/">toufic zaarour</a>
(<a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/sqlite/">sqlite</a>, <a href="/recipes/tags/wxpython/">wxpython</a>).
Revision 2.
</p>
<p>A GUI built around wxPython in a way that will allow you to add to this application other forms and functionalities. The main DialogBox is to create,in a fast way, Sqlite3 databases that are used for web or applications development. In order to work properly, save the script in a separate directory.There is also more; each time you create a database a text file named "CreationLog.txt" will be created (for the first time you use the application or if it is not there) and updated, describing when and where was your database created and with what SQL query. I am pleased to receive all the suggestions and improvements on this site or to my e-mail directly if this is convenient to you.</p>
Python DBAPI 2 "qmark" to "named" paramstyle (Python)
2012-12-14T19:39:04-08:00Steve Howehttp://code.activestate.com/recipes/users/4184602/http://code.activestate.com/recipes/578380-python-dbapi-2-qmark-to-named-paramstyle/
<p style="color: grey">
Python
recipe 578380
by <a href="/recipes/users/4184602/">Steve Howe</a>
(<a href="/recipes/tags/dbapi/">dbapi</a>, <a href="/recipes/tags/named/">named</a>, <a href="/recipes/tags/paramstyle/">paramstyle</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/qmark/">qmark</a>, <a href="/recipes/tags/sqlite/">sqlite</a>, <a href="/recipes/tags/sqlite3/">sqlite3</a>).
</p>
<p>Allows to use "named"-style params with drivers that support only "qmark"-style, as sqlite3.</p>
Android Gmail: export messages from SQLite database blobs (Python)
2013-03-22T11:45:11-07:00ccpizzahttp://code.activestate.com/recipes/users/4170754/http://code.activestate.com/recipes/578106-android-gmail-export-messages-from-sqlite-database/
<p style="color: grey">
Python
recipe 578106
by <a href="/recipes/users/4170754/">ccpizza</a>
(<a href="/recipes/tags/android/">android</a>, <a href="/recipes/tags/sqlite/">sqlite</a>).
Revision 5.
</p>
<p>This script will extract email message bodies from the SQLite database stored in an android phone.</p>
<p>The gmail database is typically located on your phone under the following location:</p>
<pre class="prettyprint"><code>`\data\data\com.google.android.gm\databases\mailstore.YOURUSERNAME@gmail.com.db`
</code></pre>
<p>To use the script, copy the file above from your phone to your machine and rename it to <code>gmail.db</code>.</p>
<p><em>NOTE:</em> You need a rooted phone in order to get access to the folder above.</p>
sqlite message bus (Python)
2010-01-11T09:36:21-08:00André Bjärbyhttp://code.activestate.com/recipes/users/97994/http://code.activestate.com/recipes/577001-sqlite-message-bus/
<p style="color: grey">
Python
recipe 577001
by <a href="/recipes/users/97994/">André Bjärby</a>
(<a href="/recipes/tags/message_bus/">message_bus</a>, <a href="/recipes/tags/sqlite/">sqlite</a>).
</p>
<p>Let several (unix) processes communicate via a shared sqlite database.</p>
firefox sqlite files cleaner (Python)
2009-07-18T21:41:13-07:00peekaahttp://code.activestate.com/recipes/users/2919471/http://code.activestate.com/recipes/576842-firefox-sqlite-files-cleaner/
<p style="color: grey">
Python
recipe 576842
by <a href="/recipes/users/2919471/">peekaa</a>
(<a href="/recipes/tags/firefox/">firefox</a>, <a href="/recipes/tags/sqlite/">sqlite</a>).
Revision 7.
</p>
<p>Walks through the all the Firefox profiles in current user account and cleans all
*.sqlite files with "vacuum". It makes firefox faster then often. Should work on Linux, too, when properly changed constants.</p>
<p>For: python 2.6 (2.5+sqlite3), FF 3.5</p>
firefox sqlite files cleaner (linux) (Python)
2009-07-15T12:15:20-07:00Vince Spicerhttp://code.activestate.com/recipes/users/4171124/http://code.activestate.com/recipes/576843-firefox-sqlite-files-cleaner-linux/
<p style="color: grey">
Python
recipe 576843
by <a href="/recipes/users/4171124/">Vince Spicer</a>
(<a href="/recipes/tags/firefox/">firefox</a>, <a href="/recipes/tags/sqlite/">sqlite</a>).
Revision 3.
</p>
<p>Modified from <a href="http://code.activestate.com/recipes/576842/">Recipe 576842</a> to support linux</p>
<p>Walks through the all the Firefox profiles in current user account and cleans all *.sqlite files with "vacuum". It makes firefox faster then often. </p>
<p>tested on Ubuntu</p>
<p>For: python 2.6 (2.5+sqlite3), FF 3.5</p>
MultiThread support for SQLite access. (Python)
2010-07-20T14:29:35-07:00Louis RIVIEREhttp://code.activestate.com/recipes/users/4035877/http://code.activestate.com/recipes/526618-multithread-support-for-sqlite-access/
<p style="color: grey">
Python
recipe 526618
by <a href="/recipes/users/4035877/">Louis RIVIERE</a>
(<a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/sqlite/">sqlite</a>, <a href="/recipes/tags/threads/">threads</a>).
Revision 4.
</p>
<p>Workaround for the SQLite limitation that prevents multiple threads from sharing a Connection object.</p>