buildingmotif.building_motif.building_motif#

Functions

get_building_motif()

Returns singleton instance of BuildingMOTIF.

Classes

BuildingMOTIF(*args, **kwargs)

Manages BuildingMOTIF data classes.

BuildingMotifEngine(engine, Session)

BuildingMotifEngine is a class that wraps a SQLAlchemy Engine and Session.

class BuildingMOTIF(*args, **kwargs)[source]#

Manages BuildingMOTIF data classes.

property session#
setup_tables()[source]#

Creates all tables in the underlying database.

setup_logging(log_level)[source]#

Create log file with DEBUG level and stdout handler with specified logging level.

Parameters:

log_level (int) – logging level of detail

close() None[source]#

Close session and engine.

clean()#
get_building_motif() BuildingMOTIF[source]#

Returns singleton instance of BuildingMOTIF.

Requires that BuildingMOTIF has been instantiated before, otherwise raises an exception.

Raises:

SingletonNotInstantiatedException – if buildingmotif hasn’t been instantiated

Returns:

singleton instance of buildingmotif

Return type:

BuildingMOTIF

class BuildingMotifEngine(engine, Session)[source]#

BuildingMotifEngine is a class that wraps a SQLAlchemy Engine and Session.

This enables the use of sessioned transactions in rdflib-sqlalchemy. If we are experiencing weird graph database issues this may be the cause.

begin()[source]#
connect()[source]#