Popular recipes tagged "meta:requires=sqlite3"http://code.activestate.com/recipes/tags/meta:requires=sqlite3/2016-04-10T22:43:57-07:00ActiveState Code RecipesHow to parse a table in a PDF document (Python) 2016-04-10T22:43:57-07:00Jorj X. McKiehttp://code.activestate.com/recipes/users/4193772/http://code.activestate.com/recipes/580635-how-to-parse-a-table-in-a-pdf-document/ <p style="color: grey"> Python recipe 580635 by <a href="/recipes/users/4193772/">Jorj X. McKie</a> (<a href="/recipes/tags/cbz/">cbz</a>, <a href="/recipes/tags/epub/">epub</a>, <a href="/recipes/tags/fitz/">fitz</a>, <a href="/recipes/tags/mupdf/">mupdf</a>, <a href="/recipes/tags/openxps/">openxps</a>, <a href="/recipes/tags/parsing/">parsing</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/pymupdf/">pymupdf</a>, <a href="/recipes/tags/table/">table</a>, <a href="/recipes/tags/xps/">xps</a>). Revision 4. </p> <p>A Python function that converts a table contained in a page of a PDF (or OpenXPS, EPUB, CBZ, XPS) document to a matrix-like Python object (list of lists of strings).</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 Phone Book GUI Built in wxPython Connected To Database Using Data Grid View (Python) 2013-09-29T19:25:23-07:00toufic zaarourhttp://code.activestate.com/recipes/users/4187866/http://code.activestate.com/recipes/578676-a-phone-book-gui-built-in-wxpython-connected-to-da/ <p style="color: grey"> Python recipe 578676 by <a href="/recipes/users/4187866/">toufic zaarour</a> (<a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/datagridview/">datagridview</a>, <a href="/recipes/tags/graphical/">graphical</a>, <a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/interface/">interface</a>). </p> <p>this GUI as simple as it is explains some basic but important graphical database interfacing; "Add", "Edit","Delete","Search" and few others along with a data grid view. in order to work create an sqlite3 database as follows:</p> <p>data table : Phone, column 1 : ID, column 2 : name, column 3 : surname, column 4 : telephone.</p> <p>save the sqlite3 file as file.db in a folder called Data and place it in the same directory as your python script.</p> <p>if you want to create the sqlite3 database graphically use my previous post : <a href="http://code.activestate.com/recipes/578665-a-wxpython-gui-to-create-sqlite3-databases/" rel="nofollow">http://code.activestate.com/recipes/578665-a-wxpython-gui-to-create-sqlite3-databases/</a></p> <p>Also there is more: I did not use auto-number for 'id' because I also wanted to include in the code a renumbering script.</p> <p>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> <p>note: if you don't like the database table name, and columns name create your own but make sure to change them in the code as well! in the end life is great! remember that!</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> Saving snippets to SQLite3 database (Python) 2014-07-30T07:23:36-07:00p@ntut$http://code.activestate.com/recipes/users/4183895/http://code.activestate.com/recipes/578285-saving-snippets-to-sqlite3-database/ <p style="color: grey"> Python recipe 578285 by <a href="/recipes/users/4183895/">p@ntut$</a> (<a href="/recipes/tags/database/">database</a>). Revision 5. </p> <p>Save your snippets/codes to sqlite3 database, search, edit, and delete.</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> Update Google Chrome localstorage file for version compatibility (Python) 2011-08-23T13:41:49-07:00Russellhttp://code.activestate.com/recipes/users/4173357/http://code.activestate.com/recipes/577855-update-google-chrome-localstorage-file-for-version/ <p style="color: grey"> Python recipe 577855 by <a href="/recipes/users/4173357/">Russell</a> (<a href="/recipes/tags/chrome/">chrome</a>, <a href="/recipes/tags/chromium/">chromium</a>, <a href="/recipes/tags/localstorage/">localstorage</a>). </p> <p>Google chrome changes the way key/value stores in localstorage file during upgrading from 11 to 15. This breaks data of many websites and extensions which depends on localstorage. This script upgrade the old localstorage data to make them work again.</p> Secure Password Generator (Python) 2011-06-17T15:25:20-07:00amir naghavihttp://code.activestate.com/recipes/users/4177294/http://code.activestate.com/recipes/577759-secure-password-generator/ <p style="color: grey"> Python recipe 577759 by <a href="/recipes/users/4177294/">amir naghavi</a> (<a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/random/">random</a>). </p> <p>A password generator that uses OS facilities to generate none pseudo random numbers. the SystemRandom uses CryptGenRandom in Windows and /dev/random in linux and it is so better to use this to create random numbers in cryptography or any other security areas.</p> url_spider (Python) 2011-03-14T09:08:28-07:00amir naghavihttp://code.activestate.com/recipes/users/4177294/http://code.activestate.com/recipes/577608-url_spider/ <p style="color: grey"> Python recipe 577608 by <a href="/recipes/users/4177294/">amir naghavi</a> (<a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/regex/">regex</a>, <a href="/recipes/tags/web/">web</a>). Revision 3. </p> <p>a simple url spider that goes through web pages and collects urls.</p> Bible Verse Quiz - database.py (Python) 2010-02-12T04:22:59-08:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/577052-bible-verse-quiz-databasepy/ <p style="color: grey"> Python recipe 577052 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/bible/">bible</a>, <a href="/recipes/tags/quiz/">quiz</a>, <a href="/recipes/tags/verse/">verse</a>, <a href="/recipes/tags/_versematch_/">_versematch_</a>). Revision 2. </p> <p>Serve verses from the Bible in response to SQL queries.</p> <p>Pulling Bible verses out of a database allows query details to be abstracted away and powerful Verse objects returned to the caller.</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> Build sqlite3 database like a locatedb (Python) 2009-11-19T17:20:52-08:00Keisuke URAGOhttp://code.activestate.com/recipes/users/668964/http://code.activestate.com/recipes/576960-build-sqlite3-database-like-a-locatedb/ <p style="color: grey"> Python recipe 576960 by <a href="/recipes/users/668964/">Keisuke URAGO</a> (<a href="/recipes/tags/file/">file</a>, <a href="/recipes/tags/find/">find</a>, <a href="/recipes/tags/locatedb/">locatedb</a>). Revision 2. </p> <p>This recipe is "updatedb" like command.</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> Draft for an sqlite3 based DBM (Python) 2009-01-30T10:27:30-08:00Raymond Hettingerhttp://code.activestate.com/recipes/users/178123/http://code.activestate.com/recipes/576638-draft-for-an-sqlite3-based-dbm/ <p style="color: grey"> Python recipe 576638 by <a href="/recipes/users/178123/">Raymond Hettinger</a> . Revision 4. </p> <p>Makes shelves viable again in 3.0. Still a work in progress.</p> Classic ASP script analyzer, finds all functions, includes, duplicite functions (Python) 2008-09-18T02:39:29-07:00brano sobotkahttp://code.activestate.com/recipes/users/4167145/http://code.activestate.com/recipes/576510-classic-asp-script-analyzer-finds-all-functions-in/ <p style="color: grey"> Python recipe 576510 by <a href="/recipes/users/4167145/">brano sobotka</a> (<a href="/recipes/tags/analyze_asp/">analyze_asp</a>, <a href="/recipes/tags/tk_gui/">tk_gui</a>). </p> <p>Input root of your asp project to "File to analyze" it means some default.asp or index.asp. Select what do you what to find and click start analyze. Classic ASP don't care about duplicate function names, what creates unpredictable mistakes.</p> Recreate MS Access table in SQLite (Python) 2008-07-01T16:22:39-07:00K. Killebrewhttp://code.activestate.com/recipes/users/4144739/http://code.activestate.com/recipes/572165-recreate-ms-access-table-in-sqlite/ <p style="color: grey"> Python recipe 572165 by <a href="/recipes/users/4144739/">K. Killebrew</a> (<a href="/recipes/tags/database/">database</a>). Revision 9. </p> <p>A function to create and load a table in SQLite from a Microsoft Jet table, using DAO. Also recreates indexes. Fetches and loads records in blocks with a default size of 1000 rows.</p> Google Hits (Python) 2008-06-08T21:29:17-07:00A Bhttp://code.activestate.com/recipes/users/4145641/http://code.activestate.com/recipes/572173-google-hits/ <p style="color: grey"> Python recipe 572173 by <a href="/recipes/users/4145641/">A B</a> (<a href="/recipes/tags/web/">web</a>). Revision 2. </p> <p>The getHits function in this file takes as input a search term string, and returns as output a dict containing the number of web hits returned for that search term. The Google search engine and a SQLite database are used. See code for usage information.</p>