ianb/pywebapp — Issue #4: Database URLs
Author: kennethreitz
Created: 2012-02-11 00:55:33+00:00
State: open

In the database configuration section, things are a bit verbose:

```
host:
The host that the database is on (e.g., ``"localhost"``)

port:
The port of the database

dbname:
The name of the database (e.g., ``db_1234``)

user:
The user to connect as. May be None.

password:
The password to connect with. May be None.
```

This could easily be consolidated to a single `database` config.

Example:

`postgres://uh1x438ayyz6v:pgpptat9yofmyie7@ec2-50-17-187-253.compute-1.amazonaws.com:5432/dl2jcx3le9wlq`

Format:

`type://username:password@host:port/dbname`

Many other communities are doing this, and many database systems (SQLAlchemy, for example), support this style of URL out of the box.