METADATA 3.8 KB

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