Skip to main content

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

Project description

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.13 supported.

Django 4.2 to 5.1 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.

Project details


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.4.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

django_harlequin-1.4.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_harlequin-1.4.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for django_harlequin-1.4.0.tar.gz
Algorithm Hash digest
SHA256 130cd77ddad9b9cd48e8a7ffff515c1ea1a89ff53200c59eb69330fa8eae17fd
MD5 356cc80c7c912e8d827f53c354d3613e
BLAKE2b-256 ed28ec42c0c2d69f7a30e0a704348a0b3b372dac4915501329609b06302d8cca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_harlequin-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e42e78206b506236a7ce7dedc65f944e70654f952965d3a4cceba72c298b7e0
MD5 d9c7d639c0a00b20844b7073844d7126
BLAKE2b-256 e9a09f0db34364db9082ae11605eabaf3736e8f17edaa4cacc0aa8e24e8159d6

See more details on using hashes here.

Supported by

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