本文整理匯總了Python中galaxy.util.bunch.Bunch.hgweb_config_manager方法的典型用法代碼示例。如果您正苦於以下問題:Python Bunch.hgweb_config_manager方法的具體用法?Python Bunch.hgweb_config_manager怎麽用?Python Bunch.hgweb_config_manager使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類galaxy.util.bunch.Bunch
的用法示例。
在下文中一共展示了Bunch.hgweb_config_manager方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: init
# 需要導入模塊: from galaxy.util.bunch import Bunch [as 別名]
# 或者: from galaxy.util.bunch.Bunch import hgweb_config_manager [as 別名]
def init( file_path, url, engine_options={}, create_tables=False ):
"""Connect mappings to the database"""
# Load the appropriate db module
load_egg_for_url( url )
# Create the database engine
engine = create_engine( url, **engine_options )
# Connect the metadata to the database.
metadata.bind = engine
# Clear any existing contextual sessions and reconfigure
Session.remove()
Session.configure( bind=engine )
# Create tables if needed
if create_tables:
metadata.create_all()
# Pack everything into a bunch
result = Bunch( **globals() )
result.engine = engine
result.session = Session
result.create_tables = create_tables
# Load local tool shed security policy
result.security_agent = CommunityRBACAgent( result )
result.shed_counter = shed_statistics.ShedCounter( result )
result.hgweb_config_manager = galaxy.webapps.tool_shed.util.hgweb_config.HgWebConfigManager()
return result