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": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Pgcli Core Team",
"author_email": "pgcli-dev@googlegroups.com",
"download_url": "https://files.pythonhosted.org/packages/b6/bd/21d05caf4c66b87abb4f1a7340ac2596f10087e9f60b95c84369febcf377/pgspecial-2.1.3.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.3",
"project_urls": {
"Homepage": "https://www.dbcli.com"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "14970c25576c0728d3d5a7a4bb760235b6ad7626a593d55798f10aeabca32242",
"md5": "7d4f8d2ea1412cc16b7591b61717eaff",
"sha256": "fe84f069247cccca037969fec46b4e699f68c23e0015fffd4c40d6bcd2aafcd5"
},
"downloads": -1,
"filename": "pgspecial-2.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7d4f8d2ea1412cc16b7591b61717eaff",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 35848,
"upload_time": "2024-11-26T04:42:13",
"upload_time_iso_8601": "2024-11-26T04:42:13.964180Z",
"url": "https://files.pythonhosted.org/packages/14/97/0c25576c0728d3d5a7a4bb760235b6ad7626a593d55798f10aeabca32242/pgspecial-2.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b6bd21d05caf4c66b87abb4f1a7340ac2596f10087e9f60b95c84369febcf377",
"md5": "3f823cbb691ca4ad2e81628ee064d2b4",
"sha256": "6d4d2316aff7d47954db99d4c391d6c0bb26568ebcb9d151f65dab7938b6cbe2"
},
"downloads": -1,
"filename": "pgspecial-2.1.3.tar.gz",
"has_sig": false,
"md5_digest": "3f823cbb691ca4ad2e81628ee064d2b4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 51204,
"upload_time": "2024-11-26T04:42:15",
"upload_time_iso_8601": "2024-11-26T04:42:15.022871Z",
"url": "https://files.pythonhosted.org/packages/b6/bd/21d05caf4c66b87abb4f1a7340ac2596f10087e9f60b95c84369febcf377/pgspecial-2.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-26 04:42:15",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pgspecial"
}