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.8 to 3.12 supported.

Django 3.2 to 5.0 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 '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.1.2.tar.gz (7.2 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.1.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_harlequin-1.1.2.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for django_harlequin-1.1.2.tar.gz
Algorithm Hash digest
SHA256 1b8a15ca8c2b95c5b52b7b6908a2297970f409639d31bb92e63dffeb49535230
MD5 e60d38b3bd3f5b4dd18a40f3487527a9
BLAKE2b-256 a6879006ab2ab0133aaab2f043fa1fc49d6ace0dcf198dbad3304b9287a35706

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_harlequin-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cea82cbfdc84acb51196fa2047f6ff433263bc8750ede4421804fec4d7aa4217
MD5 f9adf91b246b110c7ab0fe759240b7ba
BLAKE2b-256 79529d1480cf5dea648e944e237fdfca2a73b30bc9b396b495f5050467e3af7f

See more details on using hashes here.

Release history Release notifications | RSS feed

1.7.0

2 files

1.6.0

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

This release

1.1.2 This release

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page