Django: Introducing django-harlequin, a launcher for Terminal-based SQL IDE Harlequin
Harlequin is a Terminal-based SQL IDE by Ted Conbeer. It is pretty popular, with over 2,500 GitHub Stars and counting. It looks like this:
Harlequin is built with Textual to give a very interactive experience on the terminal. You can click around its UI and use keyboard shortcuts.
I love having this kind of power in a terminal app. It’s easy to run Harlequin over SSH or in other situations where exposing a database to a GUI application is tricky.
Over the weekend, I created django-harlequin. This package provides a Django management command to launch Harlequin for your Django-defined databases, similar to Django’s built-in dbshell
command. This way, you won’t need to copy-paste any connection settings to Harlequin.
Use the command like so:
$ ./manage.py harlequin
Or, select a different database:
$ ./manage.py harlequin --database replica
For more information, see the package README.
I’m still trying out Harlequin, so there may be things I have missed adding - if so, let me know. (I deliberately skipped Oracle support but created an issue, if you’re interested.)
Learn how to make your tests run quickly in my book Speed Up Your Django Tests.
One summary email a week, no spam, I pinky promise.
Related posts:
- Django: An admin extension to prevent state leaking between requests
- Django: Pinpoint upstream changes with Git
- Django: Write-up on optimizing the system check framework
Tags: django