<s> import sys <EOL> from biicode . server . rest . rest_api_server import RestApiServer <EOL> from biicode . server . conf import BII_MONGO_URI , BII_MEMCACHE_SERVERS , BII_MEMCACHE_USERNAME , BII_MEMCACHE_PASSWORD , BII_MAX_MONGO_POOL_SIZE <EOL> from biicode . server . store . mongo_server_store import MongoServerStore <EOL> from biicode . server . store . mongo_store import MongoStore <EOL> store = MongoServerStore ( MongoStore . makeConnection ( BII_MONGO_URI , <EOL> max_pool_size = BII_MAX_MONGO_POOL_SIZE ) ) <EOL> if BII_MEMCACHE_SERVERS : <EOL> from biicode . server . store . memcache_proxy_store import MemCacheProxyStore <EOL> import pylibmc <EOL> client = pylibmc . Client ( servers = [ BII_MEMCACHE_SERVERS ] , <EOL> username = BII_MEMCACHE_USERNAME , <EOL> password = BII_MEMCACHE_PASSWORD , <EOL> binary = True ) <EOL> proxy = MemCacheProxyStore ( store , client ) <EOL> else : <EOL> proxy = store <EOL> ra = RestApiServer ( proxy ) <EOL> app = ra . root_app </s>
