pgspecial


Namepgspecial JSON
Version 2.1.1 PyPI version JSON
download
home_pagehttps://www.dbcli.com
SummaryMeta-commands handler for Postgres Database.
upload_time2023-10-29 23:09:03
maintainer
docs_urlNone
authorPgcli Core Team
requires_python
licenseLICENSE.txt
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Meta-commands for Postgres
--------------------------

|Build Status|  |PyPI|

This package provides an API to execute meta-commands (AKA "special", or
"backslash commands") on PostgreSQL.

Quick Start
-----------

This is a python package. It can be installed with:

::

    $ pip install pgspecial


Usage
-----

Once this library is included into your project, you will most likely use the
following imports:

.. code-block:: python

    from pgspecial.main import PGSpecial
    from pgspecial.namedqueries import NamedQueries

Then you will create and use an instance of PGSpecial:

.. code-block:: python

        pgspecial = PGSpecial()
        for result in pgspecial.execute(cur, sql):
            # Do something

If you want to import named queries from an existing config file, it is
convenient to initialize and keep around the class variable in
``NamedQueries``:

.. code-block:: python

    from configobj import ConfigObj

    NamedQueries.instance = NamedQueries.from_config(
        ConfigObj('~/.config_file_name'))

Contributions:
--------------

If you're interested in contributing to this project, first of all I would like
to extend my heartfelt gratitude. I've written a small doc to describe how to
get this running in a development setup.

https://github.com/dbcli/pgspecial/blob/master/DEVELOP.rst

Please feel free to file an issue if you need help.

Projects using it:
------------------

This library is used by the following projects:

pgcli_: A REPL for Postgres.

`ipython-sql`_: %%sql magic for IPython

OmniDB_: An web tool for database management

If you find this module useful and include it in your project, I'll be happy
to know about it and list it here.

.. |Build Status| image:: https://github.com/dbcli/pgspecial/workflows/pgspecial/badge.svg
    :target: https://github.com/dbcli/pgspecial/actions?query=workflow%3Apgspecial

.. |PyPI| image:: https://badge.fury.io/py/pgspecial.svg
    :target: https://pypi.python.org/pypi/pgspecial/
    :alt: Latest Version

.. _pgcli: https://github.com/dbcli/pgcli
.. _`ipython-sql`: https://github.com/catherinedevlin/ipython-sql
.. _OmniDB: https://github.com/OmniDB/OmniDB

            

Raw data

            {
    "_id": null,
    "home_page": "https://www.dbcli.com",
    "name": "pgspecial",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Pgcli Core Team",
    "author_email": "pgcli-dev@googlegroups.com",
    "download_url": "https://files.pythonhosted.org/packages/2e/b8/52f0d19d80872df8ed2bbfc4569196e30d455d3b5f91659a6bf5c0d8e57e/pgspecial-2.1.1.tar.gz",
    "platform": null,
    "description": "Meta-commands for Postgres\n--------------------------\n\n|Build Status|  |PyPI|\n\nThis package provides an API to execute meta-commands (AKA \"special\", or\n\"backslash commands\") on PostgreSQL.\n\nQuick Start\n-----------\n\nThis is a python package. It can be installed with:\n\n::\n\n    $ pip install pgspecial\n\n\nUsage\n-----\n\nOnce this library is included into your project, you will most likely use the\nfollowing imports:\n\n.. code-block:: python\n\n    from pgspecial.main import PGSpecial\n    from pgspecial.namedqueries import NamedQueries\n\nThen you will create and use an instance of PGSpecial:\n\n.. code-block:: python\n\n        pgspecial = PGSpecial()\n        for result in pgspecial.execute(cur, sql):\n            # Do something\n\nIf you want to import named queries from an existing config file, it is\nconvenient to initialize and keep around the class variable in\n``NamedQueries``:\n\n.. code-block:: python\n\n    from configobj import ConfigObj\n\n    NamedQueries.instance = NamedQueries.from_config(\n        ConfigObj('~/.config_file_name'))\n\nContributions:\n--------------\n\nIf you're interested in contributing to this project, first of all I would like\nto extend my heartfelt gratitude. I've written a small doc to describe how to\nget this running in a development setup.\n\nhttps://github.com/dbcli/pgspecial/blob/master/DEVELOP.rst\n\nPlease feel free to file an issue if you need help.\n\nProjects using it:\n------------------\n\nThis library is used by the following projects:\n\npgcli_: A REPL for Postgres.\n\n`ipython-sql`_: %%sql magic for IPython\n\nOmniDB_: An web tool for database management\n\nIf you find this module useful and include it in your project, I'll be happy\nto know about it and list it here.\n\n.. |Build Status| image:: https://github.com/dbcli/pgspecial/workflows/pgspecial/badge.svg\n    :target: https://github.com/dbcli/pgspecial/actions?query=workflow%3Apgspecial\n\n.. |PyPI| image:: https://badge.fury.io/py/pgspecial.svg\n    :target: https://pypi.python.org/pypi/pgspecial/\n    :alt: Latest Version\n\n.. _pgcli: https://github.com/dbcli/pgcli\n.. _`ipython-sql`: https://github.com/catherinedevlin/ipython-sql\n.. _OmniDB: https://github.com/OmniDB/OmniDB\n",
    "bugtrack_url": null,
    "license": "LICENSE.txt",
    "summary": "Meta-commands handler for Postgres Database.",
    "version": "2.1.1",
    "project_urls": {
        "Homepage": "https://www.dbcli.com"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9fc6bcef71783f4aa658dcda7fac96dcd453083de4c421cec93100946423e54e",
                "md5": "e950d2511def793fc3d2f0c2afad1aae",
                "sha256": "be841a21b0754bf8f277608c23577818798671f7bf3f9dafa9ec9d745da3c89d"
            },
            "downloads": -1,
            "filename": "pgspecial-2.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e950d2511def793fc3d2f0c2afad1aae",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 35795,
            "upload_time": "2023-10-29T23:09:01",
            "upload_time_iso_8601": "2023-10-29T23:09:01.350486Z",
            "url": "https://files.pythonhosted.org/packages/9f/c6/bcef71783f4aa658dcda7fac96dcd453083de4c421cec93100946423e54e/pgspecial-2.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2eb852f0d19d80872df8ed2bbfc4569196e30d455d3b5f91659a6bf5c0d8e57e",
                "md5": "1f0c67f1444293f059609172ebbb729c",
                "sha256": "a38239cd961fac33ce6da35c466d758acb6f942901598d7df74e5b82fe6f5636"
            },
            "downloads": -1,
            "filename": "pgspecial-2.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "1f0c67f1444293f059609172ebbb729c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 51017,
            "upload_time": "2023-10-29T23:09:03",
            "upload_time_iso_8601": "2023-10-29T23:09:03.502934Z",
            "url": "https://files.pythonhosted.org/packages/2e/b8/52f0d19d80872df8ed2bbfc4569196e30d455d3b5f91659a6bf5c0d8e57e/pgspecial-2.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-29 23:09:03",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pgspecial"
}
        
Elapsed time: 0.13093s