Django: Introducing django-harlequin, a launcher for Terminal-based SQL IDE Harlequin

I could only find a Jester picture, sorry it’s not really a 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 running

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.)

Fin

May your database design be less foolish than a harlequin,

—Adam


Learn how to make your tests run quickly in my book Speed Up Your Django Tests.


Subscribe via RSS, Twitter, Mastodon, or email:

One summary email a week, no spam, I pinky promise.

Related posts:

Tags: