skip to navigation
skip to content

postdoc 0.2.0

A helper for Postgres + Docker that works for free

Latest Version: 0.4.0

A helper for Postgres + Docker that works for free


A wrapper that wraps a postgres command with connection arguments according to the DATABASE_URL environment variable.

I originally made this because manually typing the connection args to pqsl, createdb, etc. became tiring. “Ain’t nobody got time for dat”.

Let’s say your environment is like this:

$ env | grep DATABASE_URL

You could type:

$ createdb -U docker -h elevators
createdb elevators

Or with PostDoc:

$ phd createdb
createdb -U docker -h elevators
createdb elevators

Docker doesn’t really have anything to do with this. But now that I’ve been using Docker to manage my Postgres databases, I can’t use defaults anymore.

But wait, there’s more!

You can do MySQL stuff too:

$ phd mysql
mysql -u docker -h --database elevators
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

$ phd mysqlcheck --auto-repair
mysqlcheck -u docker -h elevators --auto-repair

If your database url isn’t DATABASE_URL, you can connect to it by making it the first argument:

$ phd FATTYBASE_URL psql


Install with pip:

pip install postdoc
File Type Py Version Uploaded on Size
postdoc-0.2.0.tar.gz (md5) Source 2014-06-09 3KB