METADATA 3.8 KB

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