django-harlequin


Namedjango-harlequin JSON
Version 1.1.2 PyPI version JSON
download
home_pageNone
SummaryLaunch Harlequin, the SQL IDE for your Terminal, with your Django database configuration.
upload_time2024-05-10 09:51:48
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords django
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ================
django-harlequin
================

.. image:: https://img.shields.io/github/actions/workflow/status/adamchainz/django-harlequin/main.yml.svg?branch=main&style=for-the-badge
   :target: https://github.com/adamchainz/django-harlequin/actions?workflow=CI

.. image:: https://img.shields.io/badge/Coverage-100%25-success?style=for-the-badge
   :target: https://github.com/adamchainz/django-harlequin/actions?workflow=CI

.. image:: https://img.shields.io/pypi/v/django-harlequin.svg?style=for-the-badge
   :target: https://pypi.org/project/django-harlequin/

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge
   :target: https://github.com/psf/black

.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=for-the-badge
   :target: https://github.com/pre-commit/pre-commit
   :alt: pre-commit

Launch `Harlequin <https://harlequin.sh/>`__, the SQL IDE for your Terminal, with your Django database configuration.

----

**Work smarter and faster** with my book `Boost Your Django DX <https://adamchainz.gumroad.com/l/byddx>`__ 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:

.. code-block:: bash

    python -m pip install django-harlequin

**Second,** install Harlequin with appropriate Harlequin `adapter packages <https://harlequin.sh/docs/adapters>`__ for the database backends you use.
For example, to install Harlequin with the `PostgreSQL adapter <https://harlequin.sh/docs/postgres/index>`__:

.. code-block:: bash

    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 <https://pipx.pypa.io/latest/installation/>`__.

**Third,** add the app to your ``INSTALLED_APPS`` setting:

.. code-block:: python

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

Usage
=====

``harlequin`` command
---------------------

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

.. code-block:: console

    $ ./manage.py harlequin

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

.. code-block:: console

    $ ./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:

.. code-block:: console

    $ ./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 <https://harlequin.sh/docs/config-file>`__ for details on the available options.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-harlequin",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "Django",
    "author": null,
    "author_email": "Adam Johnson <me@adamj.eu>",
    "download_url": "https://files.pythonhosted.org/packages/a6/87/9006ab2ab0133aaab2f043fa1fc49d6ace0dcf198dbad3304b9287a35706/django_harlequin-1.1.2.tar.gz",
    "platform": null,
    "description": "================\ndjango-harlequin\n================\n\n.. image:: https://img.shields.io/github/actions/workflow/status/adamchainz/django-harlequin/main.yml.svg?branch=main&style=for-the-badge\n   :target: https://github.com/adamchainz/django-harlequin/actions?workflow=CI\n\n.. image:: https://img.shields.io/badge/Coverage-100%25-success?style=for-the-badge\n   :target: https://github.com/adamchainz/django-harlequin/actions?workflow=CI\n\n.. image:: https://img.shields.io/pypi/v/django-harlequin.svg?style=for-the-badge\n   :target: https://pypi.org/project/django-harlequin/\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge\n   :target: https://github.com/psf/black\n\n.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=for-the-badge\n   :target: https://github.com/pre-commit/pre-commit\n   :alt: pre-commit\n\nLaunch `Harlequin <https://harlequin.sh/>`__, the SQL IDE for your Terminal, with your Django database configuration.\n\n----\n\n**Work smarter and faster** with my book `Boost Your Django DX <https://adamchainz.gumroad.com/l/byddx>`__ which covers many tools to improve your development experience.\n\n----\n\nRequirements\n============\n\nPython 3.8 to 3.12 supported.\n\nDjango 3.2 to 5.0 supported.\n\nSupported database backends: MariaDB/MySQL, PostgreSQL, SQLite.\n\nInstallation\n============\n\n**First,** install with pip:\n\n.. code-block:: bash\n\n    python -m pip install django-harlequin\n\n**Second,** install Harlequin with appropriate Harlequin `adapter packages <https://harlequin.sh/docs/adapters>`__ for the database backends you use.\nFor example, to install Harlequin with the `PostgreSQL adapter <https://harlequin.sh/docs/postgres/index>`__:\n\n.. code-block:: bash\n\n    python -m pip 'harlequin[postgres]'\n\nHarlequin does not need to be installed in the same virtual environment as Django, as django-harlequin does not import it.\nYou 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 <https://pipx.pypa.io/latest/installation/>`__.\n\n**Third,** add the app to your ``INSTALLED_APPS`` setting:\n\n.. code-block:: python\n\n    INSTALLED_APPS = [\n        ...,\n        \"django_harlequin\",\n        ...,\n    ]\n\nUsage\n=====\n\n``harlequin`` command\n---------------------\n\nRun the ``harlequin`` management command to launch Harlequin, connected to your default database:\n\n.. code-block:: console\n\n    $ ./manage.py harlequin\n\nPass ``--database`` to select a different database connection from ``settings.DATABASES``:\n\n.. code-block:: console\n\n    $ ./manage.py harlequin --database replica\n\nExtra options, optionally after a ``--`` delimiter, will be passed through to Harlequin.\nFor example, to read its help page, as opposed to that of the management command:\n\n.. code-block:: console\n\n    $ ./manage.py harlequin -- --help\n\nConfiguration\n=============\n\nHarlequin automatically loads configuration from ``pyproject.toml`` or its own files within the current working directory, which would mean next to your ``manage.py`` file.\nSee Harlequin\u2019s `configuration documentation <https://harlequin.sh/docs/config-file>`__ for details on the available options.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Launch Harlequin, the SQL IDE for your Terminal, with your Django database configuration.",
    "version": "1.1.2",
    "project_urls": {
        "Changelog": "https://github.com/adamchainz/django-harlequin/blob/main/CHANGELOG.rst",
        "Funding": "https://adamj.eu/books/",
        "Repository": "https://github.com/adamchainz/django-harlequin"
    },
    "split_keywords": [
        "django"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "79529d1480cf5dea648e944e237fdfca2a73b30bc9b396b495f5050467e3af7f",
                "md5": "f9adf91b246b110c7ab0fe759240b7ba",
                "sha256": "cea82cbfdc84acb51196fa2047f6ff433263bc8750ede4421804fec4d7aa4217"
            },
            "downloads": -1,
            "filename": "django_harlequin-1.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f9adf91b246b110c7ab0fe759240b7ba",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5844,
            "upload_time": "2024-05-10T09:51:47",
            "upload_time_iso_8601": "2024-05-10T09:51:47.077694Z",
            "url": "https://files.pythonhosted.org/packages/79/52/9d1480cf5dea648e944e237fdfca2a73b30bc9b396b495f5050467e3af7f/django_harlequin-1.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a6879006ab2ab0133aaab2f043fa1fc49d6ace0dcf198dbad3304b9287a35706",
                "md5": "e60d38b3bd3f5b4dd18a40f3487527a9",
                "sha256": "1b8a15ca8c2b95c5b52b7b6908a2297970f409639d31bb92e63dffeb49535230"
            },
            "downloads": -1,
            "filename": "django_harlequin-1.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e60d38b3bd3f5b4dd18a40f3487527a9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7222,
            "upload_time": "2024-05-10T09:51:48",
            "upload_time_iso_8601": "2024-05-10T09:51:48.779098Z",
            "url": "https://files.pythonhosted.org/packages/a6/87/9006ab2ab0133aaab2f043fa1fc49d6ace0dcf198dbad3304b9287a35706/django_harlequin-1.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-10 09:51:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adamchainz",
    "github_project": "django-harlequin",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "django-harlequin"
}
        
Elapsed time: 0.24541s