{"id":13461729,"url":"https://github.com/andialbrecht/sqlparse","last_synced_at":"2025-11-12T21:38:48.684Z","repository":{"id":37663312,"uuid":"4067434","full_name":"andialbrecht/sqlparse","owner":"andialbrecht","description":"A non-validating SQL parser module for Python","archived":false,"fork":false,"pushed_at":"2025-02-16T09:19:05.000Z","size":1520,"stargazers_count":3866,"open_issues_count":255,"forks_count":709,"subscribers_count":91,"default_branch":"master","last_synced_at":"2025-05-13T11:06:43.278Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andialbrecht.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-04-18T19:33:21.000Z","updated_at":"2025-05-13T02:10:52.000Z","dependencies_parsed_at":"2024-03-15T08:25:11.886Z","dependency_job_id":"5bafbd06-0b0c-451e-ae65-dfd87d85f9b3","html_url":"https://github.com/andialbrecht/sqlparse","commit_stats":{"total_commits":1174,"total_committers":113,"mean_commits":"10.389380530973451","dds":"0.44122657580919933","last_synced_commit":"38c065b86ac43f76ffd319747e57096ed78bfa63"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andialbrecht%2Fsqlparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andialbrecht%2Fsqlparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andialbrecht%2Fsqlparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andialbrecht%2Fsqlparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andialbrecht","download_url":"https://codeload.github.com/andialbrecht/sqlparse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253929364,"owners_count":21985802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T11:00:54.858Z","updated_at":"2025-11-12T21:38:43.664Z","avatar_url":"https://github.com/andialbrecht.png","language":"Python","readme":"python-sqlparse - Parse SQL statements\n======================================\n\n|buildstatus|_\n|coverage|_\n|docs|_\n|packageversion|_\n\n.. docincludebegin\n\nsqlparse is a non-validating SQL parser for Python.\nIt provides support for parsing, splitting and formatting SQL statements.\n\nThe module is compatible with Python 3.8+ and released under the terms of the\n`New BSD license \u003chttps://opensource.org/licenses/BSD-3-Clause\u003e`_.\n\nVisit the project page at https://github.com/andialbrecht/sqlparse for\nfurther information about this project.\n\n\nQuick Start\n-----------\n\n.. code-block:: sh\n\n   $ pip install sqlparse\n\n.. code-block:: python\n\n   \u003e\u003e\u003e import sqlparse\n\n   \u003e\u003e\u003e # Split a string containing two SQL statements:\n   \u003e\u003e\u003e raw = 'select * from foo; select * from bar;'\n   \u003e\u003e\u003e statements = sqlparse.split(raw)\n   \u003e\u003e\u003e statements\n   ['select * from foo;', 'select * from bar;']\n\n   \u003e\u003e\u003e # Format the first statement and print it out:\n   \u003e\u003e\u003e first = statements[0]\n   \u003e\u003e\u003e print(sqlparse.format(first, reindent=True, keyword_case='upper'))\n   SELECT *\n   FROM foo;\n\n   \u003e\u003e\u003e # Parsing a SQL statement:\n   \u003e\u003e\u003e parsed = sqlparse.parse('select * from foo')[0]\n   \u003e\u003e\u003e parsed.tokens\n   [\u003cDML 'select' at 0x7f22c5e15368\u003e, \u003cWhitespace ' ' at 0x7f22c5e153b0\u003e, \u003cWildcard '*' … ]\n   \u003e\u003e\u003e\n\nLinks\n-----\n\nProject page\n   https://github.com/andialbrecht/sqlparse\n\nBug tracker\n   https://github.com/andialbrecht/sqlparse/issues\n\nDocumentation\n   https://sqlparse.readthedocs.io/\n\nOnline Demo\n   https://sqlformat.org/\n\n\nsqlparse is licensed under the BSD license.\n\nParts of the code are based on pygments written by Georg Brandl and others.\npygments-Homepage: http://pygments.org/\n\n.. |buildstatus| image:: https://github.com/andialbrecht/sqlparse/actions/workflows/python-app.yml/badge.svg\n.. _buildstatus: https://github.com/andialbrecht/sqlparse/actions/workflows/python-app.yml\n.. |coverage| image:: https://codecov.io/gh/andialbrecht/sqlparse/branch/master/graph/badge.svg\n.. _coverage: https://codecov.io/gh/andialbrecht/sqlparse\n.. |docs| image:: https://readthedocs.org/projects/sqlparse/badge/?version=latest\n.. _docs: https://sqlparse.readthedocs.io/en/latest/?badge=latest\n.. |packageversion| image:: https://img.shields.io/pypi/v/sqlparse?color=%2334D058\u0026label=pypi%20package\n.. _packageversion: https://pypi.org/project/sqlparse\n","funding_links":[],"categories":["Text Processing","Python","文本处理","Python (1887)","Text Processing [🔝](#readme)","Awesome Python","SQL","Database Tools"],"sub_categories":["Text Processing","Parsers"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandialbrecht%2Fsqlparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandialbrecht%2Fsqlparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandialbrecht%2Fsqlparse/lists"}