$npx skillfedfor your agent

mo-sql-parsing

More SQL Parsing! Parse SQL into JSON parse tree

With conditionsPyPI LibrariesReleased Oct 2025204.4K downloads / moMPL 2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — mo_sql_parsing-11.697.25301-py3-none-any.whl
v11.697.25301 · released 2025-10-28 · 4 runtime deps: mo-dots, mo-future, mo-imports, mo-parsing

Yes, if you need to parse SQL into a structured, JSON-friendly format for cross-database translation or query analysis. The package is stable (Production/Stable status) with broad Python version support and no known vulnerabilities. The aging maintenance status (290 days since last release) is a minor concern for active development, but the repository remains responsive to issues. The MPL 2.0 copyleft license requires disclosure of modifications. Install friction is low.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction with a pure-Python wheel and four lightweight runtime dependencies.
  • Maintenance is aging—last release was 290 days ago—but the repository remains active with ongoing issue resolution and over 1200 tests covering most SQL dialects.

License · maintenance · safety

MPL 2.0 (copyleft) — Licensed under MPL 2.0 (copyleft). You must disclose source modifications and distribute under the same license if you modify the package; using it unmodified in a closed-source application is permitted.

last release 2025-10-28 (290 days) · last repo commit 2025-10-28 · 294 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 204,381 downloads/mo, #9,609 on PyPI

Verify before relying

pip install mo-sql-parsing

from mo_sql_parsing import parse
result = parse("select count(1) from jobs")
# Output: {'select': {'value': {'count': 1}}, 'from': 'jobs'}
  • Whether the parser handles all SQL edge cases in your specific database dialect without manual workarounds
  • Performance characteristics when parsing very large or deeply nested queries
Same gist for agents: .md · .json

What it is and what it does

mo-sql-parsing converts SQL queries into JSON objects where each SQL clause becomes a named property. The parser originally targeted MySQL but now supports multiple database engines including SQLServer (with bracket identifiers) and BigQuery (with array syntax). It handles complex queries including subqueries, WITH clauses, window functions, CREATE/DROP/ALTER statements, and basic DML (INSERT/UPDATE/DELETE), with limited UDF support.

The package also works in reverse: you can generate SQL from a JSON parse tree using the format function. It offers multiple parsing modes—parse_mysql for double-quoted strings, parse_sqlserver for bracket identifiers, and options to customize NULL representation and function call format (simple operator vs. normalized). The output is designed to be JSON-serializable, making it suitable for downstream translation to other datastores or query engines.

Use it for

  • Translate SQL queries between different database systems by parsing to JSON and regenerating for the target dialect
  • Build query analysis tools that inspect SQL structure programmatically via JSON representation
  • Convert SQL to alternative query languages or intermediate representations for query optimization
  • Validate or normalize SQL syntax by parsing and reformatting through the JSON layer
  • Extract metadata from SQL (table names, column references, join conditions) by traversing the parse tree

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to parse SQL into a structured, JSON-friendly format for cross-database translation or query analysis.

The package is stable (Production/Stable status) with broad Python version support and no known vulnerabilities. The aging maintenance status (290 days since last release) is a minor concern for active development, but the repository remains responsive to issues. The MPL 2.0 copyleft license requires disclosure of modifications. Install friction is low.

Install

mo-sql-parsing on PyPI

Before you install

Low install friction with a pure-Python wheel and four lightweight runtime dependencies. Maintenance is aging—last release was 290 days ago—but the repository remains active with ongoing issue resolution and over 1200 tests covering most SQL dialects.

License in practice

Licensed under MPL 2.0 (copyleft). You must disclose source modifications and distribute under the same license if you modify the package; using it unmodified in a closed-source application is permitted.

Quickstart

pip install mo-sql-parsing

from mo_sql_parsing import parse
result = parse("select count(1) from jobs")
# Output: {'select': {'value': {'count': 1}}, 'from': 'jobs'}

Verify before relying

  • Whether the parser handles all SQL edge cases in your specific database dialect without manual workarounds
  • Performance characteristics when parsing very large or deeply nested queries

Package facts

LicenseMPL 2.0 copyleft
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
4 packages
mo-dotsmo-futuremo-importsmo-parsing
MaintenanceAging 290 days since the last release
Last repo commit
First released
Downloads204,381 / month, #9,609 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableLicense :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: SQLTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Evidence: mo_sql_parsing-11.697.25301-py3-none-any.whl

Tags

Capabilities
sql parser jsonconvert sql to jsonsql query parsingsql ast generatorsql to json treeparse sql statementssql dialect parser
Topics
sql-parsingquery-translationjson-serialization

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “sql parser json”

  • mo-sql-parsingParses SQL queries into JSON-serializable parse trees, and can…
  • moz-sql-parserParses SQL queries into JSON-serializable parse trees, and can…
  • simple-ddl-parserParses SQL DDL statements and their dialect variants into structured…

Give your agent the search over MCP, or paste the wish link into any chat.

More Libraries packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
python-dateutil Worth it
PyPI · Libraries · released Mar 2024

Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.

Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.

Apache-2.0pure Python
1.2Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo

See also gw-dsl-parser · moz-sql-parser · scim2-filter-parser · simple-ddl-parser · mo-parsing · sqloxide · ddlparse · sqlparse · sql-metadata · pglast