Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(3)  |  Derive(0)  |  Import(4)

        def setup_connection_and_db_from_config(app_config):
    engine = create_engine(app_config['sql_engine'])
    # logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO)
    Session.configure(bind=engine)

    return "dummy conn", DatabaseMaster(engine)
        


src/m/e/mediagoblin-spaetz-0.3.2.dev/mediagoblin/db/sql/util.py   mediagoblin-spaetz(Download)
 
if __name__ == '__main__':
    from mediagoblin.db.sql.open import setup_connection_and_db_from_config
 
    conn,db = setup_connection_and_db_from_config({'sql_engine':'sqlite:///mediagoblin.db'})

src/m/e/mediagoblin-spaetz-0.3.2.dev/mediagoblin/db/sql/convert.py   mediagoblin-spaetz(Download)
    Tag, MediaTag, MediaFile, MediaAttachmentFile, MigrationData,
    ImageData, VideoData, AsciiData, AudioData)
from mediagoblin.db.sql.open import setup_connection_and_db_from_config as \
    sql_connect
from mediagoblin.db.mongo.open import setup_connection_and_db_from_config as \
def run_conversion(config_name):
    global_config, app_config = setup_global_and_app_config(config_name)
 
    sql_conn, sql_db = sql_connect(app_config)
    mk_conn, mk_db = mongo_connect(app_config)

src/m/e/mediagoblin-spaetz-0.3.2.dev/mediagoblin/gmg_commands/dbupdate.py   mediagoblin-spaetz(Download)
from sqlalchemy.orm import sessionmaker
 
from mediagoblin.db.sql.open import setup_connection_and_db_from_config
from mediagoblin.db.sql.util import MigrationManager
from mediagoblin.init import setup_global_and_app_config
 
    # Set up the database
    connection, db = setup_connection_and_db_from_config(app_config)
 
    Session = sessionmaker(bind=db.engine)

src/m/e/mediagoblin-spaetz-0.3.2.dev/mediagoblin/db/open.py   mediagoblin-spaetz(Download)
 
if use_sql:
    from mediagoblin.db.sql.open import \
        setup_connection_and_db_from_config, check_db_migrations_current, \
        load_models