{ "info": { "author": "jthacker", "author_email": "thacker.jon@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# ephemeral-postgres\n\n[![Build Status](https://travis-ci.org/jthacker/ephemeral_postgres.svg?branch=master)](https://travis-ci.org/jthacker/ephemeral_postgres)\n\nephemeral-postgres is a python package for easily setting up, testing, and\nfinally tearing down postgres instances. It can be easily integrated in most\ntest suites but has been primarily used with pytest.\n\n\n## Installation\n```bash\npip install ephemeral-postgres\n```\n\n## Example\n```python\nimport ephemeral_postgres\nimport psycopg2\n\nwith ephemeral_postgres.postgres() as uri:\n con = psycopg2.connect(uri)\n cur = con.cursor()\n cur.execute('select * from pg_database')\n for row in cur.fetchall():\n print(row)\n```\n\nAlternatively, if you would like to run an external Postgres server, you can\noverride ephemeral_postgres from starting a new instance by setting the\nenvironment variable `EPHEMERAL_POSTGRES_URI` accordingly. For example:\n```bash\nexport EPHEMERAL_POSTGRES_URI=\"postgresql://postgres:postgres@localhost:5432/postgres\"\npython \"import ephemeral_postgres; print(ephemeral_postgres.postgres()[0])\"\n```\n\n## Developing\n```bash\npip install -e .[test]\n\n# run unit tests\npytest\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/jthacker/ephemeral_postgres/archive/v0.2.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jthacker/ephemeral_postgres", "keywords": "postgres,postgresql,testing,docker", "license": "", "maintainer": "", "maintainer_email": "", "name": "ephemeral-postgres", "package_url": "https://pypi.org/project/ephemeral-postgres/", "platform": "", "project_url": "https://pypi.org/project/ephemeral-postgres/", "project_urls": { "Download": "https://github.com/jthacker/ephemeral_postgres/archive/v0.2.0.tar.gz", "Homepage": "https://github.com/jthacker/ephemeral_postgres" }, "release_url": "https://pypi.org/project/ephemeral-postgres/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Start an ephemeral postgres instance for easy testing", "version": "0.2.0" }, "last_serial": 4747740, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "17f10ff81bf4a891c13747a0b33e7c61", "sha256": "0ff916733a00bc7d9ca8550149f8d530c6105a3ada9c58499c0582a4b2950304" }, "downloads": -1, "filename": "ephemeral-postgres-0.1.1.tar.gz", "has_sig": false, "md5_digest": "17f10ff81bf4a891c13747a0b33e7c61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3370, "upload_time": "2019-01-26T22:28:54", "url": "https://files.pythonhosted.org/packages/52/9a/15d135b155b9dfd3f589529c0028938b8373ab3004e349d995529e644ee4/ephemeral-postgres-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "3729943860c1246246e8798a2d8d5d88", "sha256": "f58ff8d108b346d63f48b4fceeaa3f6cf834a4afd2c6418077b6d55f125ceefc" }, "downloads": -1, "filename": "ephemeral-postgres-0.2.0.tar.gz", "has_sig": false, "md5_digest": "3729943860c1246246e8798a2d8d5d88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3767, "upload_time": "2019-01-28T01:46:58", "url": "https://files.pythonhosted.org/packages/b4/0d/206bed161abc97b1fbce9a71f958dcf6dd872adb34f71cc9200ad178915f/ephemeral-postgres-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3729943860c1246246e8798a2d8d5d88", "sha256": "f58ff8d108b346d63f48b4fceeaa3f6cf834a4afd2c6418077b6d55f125ceefc" }, "downloads": -1, "filename": "ephemeral-postgres-0.2.0.tar.gz", "has_sig": false, "md5_digest": "3729943860c1246246e8798a2d8d5d88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3767, "upload_time": "2019-01-28T01:46:58", "url": "https://files.pythonhosted.org/packages/b4/0d/206bed161abc97b1fbce9a71f958dcf6dd872adb34f71cc9200ad178915f/ephemeral-postgres-0.2.0.tar.gz" } ] }