METADATA 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. Metadata-Version: 2.1
  2. Name: sqlparse
  3. Version: 0.4.2
  4. Summary: A non-validating SQL parser.
  5. Home-page: https://github.com/andialbrecht/sqlparse
  6. Author: Andi Albrecht
  7. Author-email: albrecht.andi@gmail.com
  8. License: BSD-3-Clause
  9. Project-URL: Documentation, https://sqlparse.readthedocs.io/
  10. Project-URL: Release Notes, https://sqlparse.readthedocs.io/en/latest/changes/
  11. Project-URL: Source, https://github.com/andialbrecht/sqlparse
  12. Project-URL: Tracker, https://github.com/andialbrecht/sqlparse/issues
  13. Platform: UNKNOWN
  14. Classifier: Development Status :: 5 - Production/Stable
  15. Classifier: Intended Audience :: Developers
  16. Classifier: License :: OSI Approved :: BSD License
  17. Classifier: Operating System :: OS Independent
  18. Classifier: Programming Language :: Python
  19. Classifier: Programming Language :: Python :: 3
  20. Classifier: Programming Language :: Python :: 3 :: Only
  21. Classifier: Programming Language :: Python :: 3.5
  22. Classifier: Programming Language :: Python :: 3.6
  23. Classifier: Programming Language :: Python :: 3.7
  24. Classifier: Programming Language :: Python :: 3.8
  25. Classifier: Programming Language :: Python :: 3.9
  26. Classifier: Programming Language :: Python :: Implementation :: CPython
  27. Classifier: Programming Language :: Python :: Implementation :: PyPy
  28. Classifier: Topic :: Database
  29. Classifier: Topic :: Software Development
  30. Requires-Python: >=3.5
  31. python-sqlparse - Parse SQL statements
  32. ======================================
  33. |buildstatus|_
  34. |coverage|_
  35. |docs|_
  36. .. docincludebegin
  37. sqlparse is a non-validating SQL parser for Python.
  38. It provides support for parsing, splitting and formatting SQL statements.
  39. The module is compatible with Python 3.5+ and released under the terms of the
  40. `New BSD license <https://opensource.org/licenses/BSD-3-Clause>`_.
  41. Visit the project page at https://github.com/andialbrecht/sqlparse for
  42. further information about this project.
  43. Quick Start
  44. -----------
  45. .. code-block:: sh
  46. $ pip install sqlparse
  47. .. code-block:: python
  48. >>> import sqlparse
  49. >>> # Split a string containing two SQL statements:
  50. >>> raw = 'select * from foo; select * from bar;'
  51. >>> statements = sqlparse.split(raw)
  52. >>> statements
  53. ['select * from foo;', 'select * from bar;']
  54. >>> # Format the first statement and print it out:
  55. >>> first = statements[0]
  56. >>> print(sqlparse.format(first, reindent=True, keyword_case='upper'))
  57. SELECT *
  58. FROM foo;
  59. >>> # Parsing a SQL statement:
  60. >>> parsed = sqlparse.parse('select * from foo')[0]
  61. >>> parsed.tokens
  62. [<DML 'select' at 0x7f22c5e15368>, <Whitespace ' ' at 0x7f22c5e153b0>, <Wildcard '*' … ]
  63. >>>
  64. Links
  65. -----
  66. Project page
  67. https://github.com/andialbrecht/sqlparse
  68. Bug tracker
  69. https://github.com/andialbrecht/sqlparse/issues
  70. Documentation
  71. https://sqlparse.readthedocs.io/
  72. Online Demo
  73. https://sqlformat.org/
  74. sqlparse is licensed under the BSD license.
  75. Parts of the code are based on pygments written by Georg Brandl and others.
  76. pygments-Homepage: http://pygments.org/
  77. .. |buildstatus| image:: https://secure.travis-ci.org/andialbrecht/sqlparse.png?branch=master
  78. .. _buildstatus: https://travis-ci.org/#!/andialbrecht/sqlparse
  79. .. |coverage| image:: https://codecov.io/gh/andialbrecht/sqlparse/branch/master/graph/badge.svg
  80. .. _coverage: https://codecov.io/gh/andialbrecht/sqlparse
  81. .. |docs| image:: https://readthedocs.org/projects/sqlparse/badge/?version=latest
  82. .. _docs: https://sqlparse.readthedocs.io/en/latest/?badge=latest