Skip to main content

ephemeral-postgres

Build Status

ephemeral-postgres is a python package for easily setting up, testing, and finally tearing down postgres instances. It can be easily integrated in most test suites but has been primarily used with pytest.

Installation

pip install ephemeral-postgres

Example

import ephemeral_postgres
import psycopg2

with ephemeral_postgres.postgres() as uri:
    con = psycopg2.connect(uri)
    cur = con.cursor()
    cur.execute('select * from pg_database')
    for row in cur.fetchall():
        print(row)

Developing

pip install -e .[test]

# run unit tests
pytest

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ephemeral-postgres-0.1.1.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file ephemeral-postgres-0.1.1.tar.gz.

File metadata

  • Download URL: ephemeral-postgres-0.1.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for ephemeral-postgres-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0ff916733a00bc7d9ca8550149f8d530c6105a3ada9c58499c0582a4b2950304
MD5 17f10ff81bf4a891c13747a0b33e7c61
BLAKE2b-256 529a15d135b155b9dfd3f589529c0028938b8373ab3004e349d995529e644ee4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page