fusetools.db_conn_tools.Postgres

class fusetools.db_conn_tools.Postgres[source]

Bases: object

Postgres database connections.

../_images/postgres1.png

Methods

con_postgres

Create a Postgres database connection object.

eng_postgres

Create a Postgres database engine object.

classmethod con_postgres(host, db, usr, pwd, port=None)[source]

Create a Postgres database connection object.

Parameters
  • host – Hostname for Postgres database.

  • db – Name of Postgres database.

  • usr – Postgres username.

  • pwd – Postgres password.

Returns

A Postgres database connection object.

classmethod eng_postgres(usr, pwd, port, db, ssl_str='', host=None)[source]

Create a Postgres database engine object.

Parameters
  • usr – A Postgres username.

  • pwd – A Postgres password.

  • port – Port for Postgres database.

Returns

A Postgres database connection.