| Name | pgbouncer JSON |
| Version |
0.1.0
JSON |
| download |
| home_page | https://launchpad.net/python-pgbouncer |
| Summary | Fixture to bring up temporary pgbouncer instance. |
| upload_time | 2024-10-15 11:20:04 |
| maintainer | Launchpad Developers |
| docs_url | None |
| author | None |
| requires_python | >=3.5 |
| license | None |
| keywords |
|
| VCS |
|
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
************************************************
python-pgbouncer: Python glue to drive pgbouncer
************************************************
Copyright (c) 2011, Canonical Ltd
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
python-pgbouncer provides a python interface to setup and run a pgbouncer
instance.
Dependencies
============
* Python 3.5+
* pgbouncer
* psycopg2 (https://pypi.org/project/psycopg2)
* python-fixtures (https://launchpad.net/python-fixtures or
https://pypi.org/project/fixtures)
* testtools (https://pypi.org/project/testtools)
Testing Dependencies
====================
In addition to the above, the tests also depend on:
* postgresfixture (https://pypi.org/project/postgresfixture)
* testscenarios (https://pypi.org/project/testscenarios)
Usage
=====
Create a PGBouncerFixture - a context manager with an extended protocol
supporting access to logs etc. Customise it with database definitions, user
credentials, and then when you enter the context it will create a transient
pgbouncer setup in a temporary directory and run it for the duration that the
context is open.
For instance::
>>> from pgbouncer import PGBouncerFixture
>>> bouncer = PGBouncerFixture()
>>> bouncer.databases['mydb'] = 'host=hostname dbname=foo'
>>> bouncer.users['user1'] = 'credentials'
>>> with bouncer:
... # Can now connect to bouncer.host port=bouncer.port user=user1
Any settings required for pgbouncer to work will be given sane defaults.
Installation
============
Either run setup.py in an environment with all the dependencies available, or
add the working directory to your PYTHONPATH.
Development
===========
Upstream development takes place at https://launchpad.net/python-pgbouncer.
To run the tests, run:
$ tox
Raw data
{
"_id": null,
"home_page": "https://launchpad.net/python-pgbouncer",
"name": "pgbouncer",
"maintainer": "Launchpad Developers",
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": "launchpad-dev@lists.launchpad.net",
"keywords": null,
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/2c/de/4365b4c0cf026137a97a1a396db0b0843eca0eb77f512dbe4dde69ce2b04/pgbouncer-0.1.0.tar.gz",
"platform": null,
"description": "************************************************\npython-pgbouncer: Python glue to drive pgbouncer\n************************************************\n\n Copyright (c) 2011, Canonical Ltd\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see <http://www.gnu.org/licenses/>.\n \npython-pgbouncer provides a python interface to setup and run a pgbouncer\ninstance.\n\nDependencies\n============\n\n* Python 3.5+\n\n* pgbouncer\n\n* psycopg2 (https://pypi.org/project/psycopg2)\n\n* python-fixtures (https://launchpad.net/python-fixtures or\n https://pypi.org/project/fixtures)\n\n* testtools (https://pypi.org/project/testtools)\n\nTesting Dependencies\n====================\n\nIn addition to the above, the tests also depend on:\n\n* postgresfixture (https://pypi.org/project/postgresfixture)\n\n* testscenarios (https://pypi.org/project/testscenarios)\n\nUsage\n=====\n\nCreate a PGBouncerFixture - a context manager with an extended protocol\nsupporting access to logs etc. Customise it with database definitions, user\ncredentials, and then when you enter the context it will create a transient\npgbouncer setup in a temporary directory and run it for the duration that the\ncontext is open.\n\nFor instance::\n\n >>> from pgbouncer import PGBouncerFixture\n >>> bouncer = PGBouncerFixture()\n >>> bouncer.databases['mydb'] = 'host=hostname dbname=foo'\n >>> bouncer.users['user1'] = 'credentials'\n >>> with bouncer:\n ... # Can now connect to bouncer.host port=bouncer.port user=user1\n\nAny settings required for pgbouncer to work will be given sane defaults.\n\n\nInstallation\n============\n\nEither run setup.py in an environment with all the dependencies available, or\nadd the working directory to your PYTHONPATH.\n\n\nDevelopment\n===========\n\nUpstream development takes place at https://launchpad.net/python-pgbouncer.\n\nTo run the tests, run:\n\n $ tox\n",
"bugtrack_url": null,
"license": null,
"summary": "Fixture to bring up temporary pgbouncer instance.",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://launchpad.net/python-pgbouncer"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7f9db3f9489a599d98e1c601aaae6df334ce9e3be103e5757ccd15e23e23bb82",
"md5": "c6dca9d4b0db20c0d83258e0f9636c20",
"sha256": "fbfff3a8116ca197cc0ba11cbd78dabd936ea5b20fd22322efdfcdf6dbb08d05"
},
"downloads": -1,
"filename": "pgbouncer-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c6dca9d4b0db20c0d83258e0f9636c20",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.5",
"size": 19591,
"upload_time": "2024-10-15T11:20:03",
"upload_time_iso_8601": "2024-10-15T11:20:03.120260Z",
"url": "https://files.pythonhosted.org/packages/7f/9d/b3f9489a599d98e1c601aaae6df334ce9e3be103e5757ccd15e23e23bb82/pgbouncer-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2cde4365b4c0cf026137a97a1a396db0b0843eca0eb77f512dbe4dde69ce2b04",
"md5": "4c0edd064e283fda681eb7f24a4b470c",
"sha256": "bf2452dedac71979e330787f3a98b40b5c2028da949c27360e298e04b4ff9aa7"
},
"downloads": -1,
"filename": "pgbouncer-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "4c0edd064e283fda681eb7f24a4b470c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 18765,
"upload_time": "2024-10-15T11:20:04",
"upload_time_iso_8601": "2024-10-15T11:20:04.655867Z",
"url": "https://files.pythonhosted.org/packages/2c/de/4365b4c0cf026137a97a1a396db0b0843eca0eb77f512dbe4dde69ce2b04/pgbouncer-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-15 11:20:04",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pgbouncer"
}