# dbprocessing

# 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')

  Step through and create the DB structure, relationships and constraints

dbprocessing.DButils.postgresql_url(databasename)

  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
    databasename `str`

      Name of the database

  Returns
    `str`

      Full postgresql URL, suitable for use in `create_engine()`

exception dbprocessing.DButils.DBError

  Error in accessing the database

exception dbprocessing.DButils.DBNoData

  Expected data not found in the database

exception dbprocessing.DButils.DBProcessingError

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

exception dbprocessing.DButils.FilenameParse

  Not used

Release: 0.1.0 Doc generation date: Feb 10, 2022