{ "info": { "author": "Nathan Wright", "author_email": "thatnateguy@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python" ], "description": "SQL Pretty Printer for Pygments\n===============================\n\nUse this Pygments plugin alongside your usual SQL lexer and any output\nformatter to have your SQL queries reformatted for improved readability.\n\nThis filter modifies the stream of tokens that Pygments produces by\ninserting whitespace at key points to make the structure of the query\nmore obvious.\n\nUsage\n-----\n\nFor programmatic usage, add the filter to your lexer before highlighting::\n\n from pygments import highlight, lexers, formatters\n from pygments_pprint_sql import SqlFilter\n\n lexer = lexers.MySqlLexer()\n lexer.add_filter(SqlFilter())\n print highlight(text, lexer, formatters.TerminalFormatter())\n\nThis plugin is also compatible with the pygmentize CLI tool, via the -F option::\n\n pygmentize -F pprint-sql script.sql\n\nNotes\n-----\n\nDDL statements like CREATE and ALTER are left unformatted because formatting\nthem reliably would be a significant undertaking, especially for all flavours\nof SQL.\n\nI've done my testing with queries from an application I work on that\nuses MySQL. In general it should transfer nicely to other RDBMS but I\ncan make no guarantees.\n\nPatches always welcome, provided they come with test cases!\n\nAlternatives\n------------\n\n * `SQLParse`_ is a standalone parser and formatter package with some nice\n options for customizing how formatting occurs.\n\n.. _SQLParse: https://github.com/andialbrecht/sqlparse\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/natedub/pygments-pprint-sql", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "pygments-pprint-sql", "package_url": "https://pypi.org/project/pygments-pprint-sql/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pygments-pprint-sql/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/natedub/pygments-pprint-sql" }, "release_url": "https://pypi.org/project/pygments-pprint-sql/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Pretty format your SQL queries for easier reading.", "version": "0.1.0" }, "last_serial": 898471, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "91409e6db333c15c6ac72fcedb4d2b2e", "sha256": "741dc47408ea7b1279b3272f4deb10074ea952a94418b6490f20ed187beba498" }, "downloads": -1, "filename": "pygments-pprint-sql-0.1.0.tar.gz", "has_sig": false, "md5_digest": "91409e6db333c15c6ac72fcedb4d2b2e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4797, "upload_time": "2013-10-19T18:30:01", "url": "https://files.pythonhosted.org/packages/75/7a/38b17da0718d6cd0e6e4fa02f758d663c73a045c489f690e937b94f80dda/pygments-pprint-sql-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "91409e6db333c15c6ac72fcedb4d2b2e", "sha256": "741dc47408ea7b1279b3272f4deb10074ea952a94418b6490f20ed187beba498" }, "downloads": -1, "filename": "pygments-pprint-sql-0.1.0.tar.gz", "has_sig": false, "md5_digest": "91409e6db333c15c6ac72fcedb4d2b2e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4797, "upload_time": "2013-10-19T18:30:01", "url": "https://files.pythonhosted.org/packages/75/7a/38b17da0718d6cd0e6e4fa02f758d663c73a045c489f690e937b94f80dda/pygments-pprint-sql-0.1.0.tar.gz" } ] }