fabtools.require.postgres

PostgreSQL users and databases

fabtools.require.postgres.server(version=None)[source]

Require a PostgreSQL server to be installed and running.

from fabtools import require

require.postgres.server()
fabtools.require.postgres.user(name, password, superuser=False, createdb=False, createrole=False, inherit=True, login=True, connection_limit=None, encrypted_password=False)[source]

Require the existence of a PostgreSQL user. The password and options provided will only be applied when creating a new user (existing users will not be modified).

from fabtools import require

require.postgres.user('dbuser', password='somerandomstring')

require.postgres.user('dbuser2', password='s3cr3t',
    createdb=True, create_role=True, connection_limit=20)
fabtools.require.postgres.database(name, owner, template='template0', encoding='UTF8', locale='en_US.UTF-8')[source]

Require a PostgreSQL database.

from fabtools import require

require.postgres.database('myapp', owner='dbuser')
Read the Docs v: 0.17.0
Versions
latest
0.17.0
0.16.0
0.15.0
0.14.0
0.13.0
0.12.0
0.11.0
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.