dbprocessing.DButils

Direct interfacing to dbprocessing databases.

Provides interface specific to dbprocessing databases (not general SQL databases) and performs most functionality for retrieving, changing, etc. of records.

Functions

create_tables([filename, dialect])

Step through and create the DB structure, relationships and constraints

postgresql_url(databasename)

Build postgresl database URL

Classes

DButils([mission, db_var, echo, engine])

Utility routines for DBProcessing class

Exceptions

DBError

Error in accessing the database

DBNoData

Expected data not found in the database

DBProcessingError

Higher-level error (used only for failures in logging)

FilenameParse

Not used

dbprocessing.DButils.create_tables(filename='dbprocessing_default.db', dialect='sqlite')[source]

Step through and create the DB structure, relationships and constraints

dbprocessing.DButils.postgresql_url(databasename)[source]

Build postgresl database URL

Environment variable PGUSER is required. Will also use PGHOST, PGPORT (requires PGHOST), PGPASSWORD to define database server to connect to. Anything unspecified is postgresql default.

Parameters
databasenamestr

Name of the database

Returns
str

Full postgresql URL, suitable for use in create_engine()

exception dbprocessing.DButils.DBError[source]

Error in accessing the database

exception dbprocessing.DButils.DBNoData[source]

Expected data not found in the database

exception dbprocessing.DButils.DBProcessingError[source]

Higher-level error (used only for failures in logging)

exception dbprocessing.DButils.FilenameParse[source]

Not used


Release: 0.1.0 Doc generation date: Feb 10, 2022