Skip to main content
https://img.shields.io/github/actions/workflow/status/adamchainz/django-harlequin/main.yml.svg?branch=main&style=for-the-badge https://img.shields.io/badge/Coverage-100%25-success?style=for-the-badge https://img.shields.io/pypi/v/django-harlequin.svg?style=for-the-badge https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge pre-commit

Launch Harlequin, the SQL IDE for your Terminal, with your Django database configuration.


Work smarter and faster with my book Boost Your Django DX which covers many tools to improve your development experience.


Requirements

Python 3.9 to 3.14 supported.

Django 4.2 to 5.2 supported.

Supported database backends: MariaDB/MySQL, PostgreSQL, SQLite.

Installation

First, install with pip:

python -m pip install django-harlequin

Second, install Harlequin with appropriate Harlequin adapter packages for the database backends you use. For example, to install Harlequin with the PostgreSQL adapter:

python -m pip install 'harlequin[postgres]'

Harlequin does not need to be installed in the same virtual environment as Django, as django-harlequin does not import it. You only need the harlequin command on your path, so you can install Harlequin globally, or in an isolated virtual environment with a tool like pipx.

Third, add the app to your INSTALLED_APPS setting:

INSTALLED_APPS = [
    ...,
    "django_harlequin",
    ...,
]

Usage

harlequin command

Run the harlequin management command to launch Harlequin, connected to your default database:

$ ./manage.py harlequin

Pass --database to select a different database connection from settings.DATABASES:

$ ./manage.py harlequin --database replica

Extra options, optionally after a -- delimiter, will be passed through to Harlequin. For example, to read its help page, as opposed to that of the management command:

$ ./manage.py harlequin -- --help

Configuration

Harlequin automatically loads configuration from pyproject.toml or its own files within the current working directory, which would mean next to your manage.py file. See Harlequin’s configuration documentation for details on the available options.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_harlequin-1.6.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_harlequin-1.6.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file django_harlequin-1.6.0.tar.gz.

File metadata

  • Download URL: django_harlequin-1.6.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_harlequin-1.6.0.tar.gz
Algorithm Hash digest
SHA256 8e3ea0376bfc7d6dff1a3b4800ddfd5828992decc034c3686e4fcd85d7ae3473
MD5 575107f201f01cb98509925b0fa895c7
BLAKE2b-256 1c72147b3875a13a4dac06bfc0bae8c7361b02b06ea0816f90a7612b79244dcc

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_harlequin-1.6.0.tar.gz:

Publisher: main.yml on adamchainz/django-harlequin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_harlequin-1.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_harlequin-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87158dd6ef632e0287f718be117c1868f9f0c7f33f04b4dd4373654f7bacb36d
MD5 c5d1e5cba2bf3ef02080b878a5a3369f
BLAKE2b-256 3af18f4589c14094bd536e21486642a3d0dc55e15ff4526dc5967976df4f8765

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_harlequin-1.6.0-py3-none-any.whl:

Publisher: main.yml on adamchainz/django-harlequin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page