METADATA 3.9 KB

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