# cpl.database.connection

## cpl.database.connection.database_connection

class `cpl.database.connection.database_connection.``DatabaseConnection`(database_settings: cpl.database.database_settings.DatabaseSettings)

  Bases: `cpl.database.connection.database_connection_abc.DatabaseConnectionABC`

  Representation of the database connection

  > database_settings: `cpl.database.database_settings.DatabaseSettings`

  `connect`(connection_string: str)

    Connects to a database by connection string

    > connection_string: `str`

    >   Database connection string, see: https://docs.sqlalchemy.org/en/14/core/engines.html

  property `engine`
  property `session`

## cpl.database.connection.database_connection_abc

class `cpl.database.connection.database_connection_abc.``DatabaseConnectionABC`

  Bases: `abc.ABC`

  ABC for the `cpl.database.connection.database_connection.DatabaseConnection`

  abstract `connect`(connection_string: str)

    Connects to a database by connection string

    > connection_string: `str`

    >   Database connection string, see: https://docs.sqlalchemy.org/en/14/core/engines.html

  abstract property `engine`
  abstract property `session`