Repository navigation
Initial Release of sqlnbfmt v0.1.0
sqlnbfmt v0.1.0 - Initial Release
We're excited to announce sqlnbfmt v0.1.0, a formatting tool that automatically formats SQL code within Jupyter Notebooks. This tool helps maintain clean, consistent SQL code in both standard code cells and magic cells.
Key Features
- Formats SQL queries in both standard code cells and magic cells (
%%sql) - Uses AST parsing for precise SQL identification and formatting
- Preserves query placeholders (
%s,?) in parameterized queries - Supports custom configuration via
config.yaml - Maintains SQL comments during formatting
Installation
pip install sqlnbfmtUsage
Format a notebook by running:
sqlnbfmt path/to/your_notebook.ipynbFor detailed usage instructions, visit our GitHub repository.
Known Limitations
- Some complex placeholder scenarios may not be formatted correctly
- Partial support for dialect-specific SQL syntax
Contributing
We welcome contributions!
Acknowledgments
- Built with sqlglot for SQL parsing
- Thanks to our early testers and contributors