SQLPARSE5 years of parsing andformatting SQL statements/PythonCamp, CologneMay 2013Andi Albecht @andialbrecht
sqlparse - UsagePurposeGive a little insight into SQL statements in Python.Simple top-level APIKnown Use CasesMake generat...
sqlparse - HistoryBasic needBasic need Get at least a little knowledge of statementsin CrunchyFrog.Basic ideaBasic idea Ca...
sqlparse - HistoryImmediate reply (sorry, couldnt find the original tweet):"This is just script kiddy stuff. I wont give a...
sqlparse - HistoryApr. 2013Apr. 2013 Current release (0.1.7)Its still here.
sqlparse - somenumbersabout 2.300 LOC (~3.300 total)88% test coverage, > 120 testssingle code base for Python 2.4, 2.5, 2....
sqlparse - exampleprojectsRunSQLRun - Database query tool for LinuxSuccessor of CrunchyFrog, based on Gtk3 / Python 3
http://runsqlrun.org
sqlparse - exampleprojectsSQLFormat - Online service to format SQL statementsServes as a testbed for sqlparse, formats ~1....
sqlparse - exampleprojectsDjango Debug Toolbar - Lists debug information forDjango projectsUsed for pretty printing statem...
https://github.com/django-debug-toolbar/django-debug-toolbar
sqlparse - exampleprojectsCalendar and Contacts Server - Standards compliantCalDAV and CardDAV server.Not sure for what it...
Thanks!LinksProject homepage:Documentation:Try it:ContactHomepage:Twitter:Mail:github.com/andialbrecht/sqlparsesqlparse.re...
Upcoming SlideShare
Loading in...5
×

sqlparse Lightning Talk

379

Published on

Slides from a lightning talk given at PythonCamp Cologne in May 2013. Sorry, the fonts are a bit broken in the PDF expoert.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
379
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

sqlparse Lightning Talk

  1. 1. SQLPARSE5 years of parsing andformatting SQL statements/PythonCamp, CologneMay 2013Andi Albecht @andialbrecht
  2. 2. sqlparse - UsagePurposeGive a little insight into SQL statements in Python.Simple top-level APIKnown Use CasesMake generated statements readableGive it a string, get a list of separate statementsExtract table and column namessqlparse.parse(sql,encoding=None)sqlparse.split(sql,encoding=None)sqlparse.format(sql,**options)
  3. 3. sqlparse - HistoryBasic needBasic need Get at least a little knowledge of statementsin CrunchyFrog.Basic ideaBasic idea Cant be validating since it should work whileediting SQL statements. "If highlighting isright, parsing couldnt be so wrong." → useas a base!Sep. 2008Sep. 2008 First pieces of code in CrunchyFrogApr. 2009Apr. 2009 First official release (0.1.0)Pygmentsappear
  4. 4. sqlparse - HistoryImmediate reply (sorry, couldnt find the original tweet):"This is just script kiddy stuff. I wont give a shit."Challenge accepted.
  5. 5. sqlparse - HistoryApr. 2013Apr. 2013 Current release (0.1.7)Its still here.
  6. 6. sqlparse - somenumbersabout 2.300 LOC (~3.300 total)88% test coverage, > 120 testssingle code base for Python 2.4, 2.5, 2.6, 2.7, 3.2, 3.3,PyPyversion 0.1.6 had > 10.000 downloads from PyPIlicensed under BSDdevelopment happens on Github
  7. 7. sqlparse - exampleprojectsRunSQLRun - Database query tool for LinuxSuccessor of CrunchyFrog, based on Gtk3 / Python 3
  8. 8. http://runsqlrun.org
  9. 9. sqlparse - exampleprojectsSQLFormat - Online service to format SQL statementsServes as a testbed for sqlparse, formats ~1.000 statements / dayhttp://sqlformat.org
  10. 10. sqlparse - exampleprojectsDjango Debug Toolbar - Lists debug information forDjango projectsUsed for pretty printing statements when running debugsqlshell(optional requirement).
  11. 11. https://github.com/django-debug-toolbar/django-debug-toolbar
  12. 12. sqlparse - exampleprojectsCalendar and Contacts Server - Standards compliantCalDAV and CardDAV server.Not sure for what its used there, most likely debugging ;)http://www.calendarserver.org/
  13. 13. Thanks!LinksProject homepage:Documentation:Try it:ContactHomepage:Twitter:Mail:github.com/andialbrecht/sqlparsesqlparse.readthedocs.orgsqlformat.organdialbrecht.de@andialbrechtalbrecht.andi@gmail.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×