Did I find the right examples for you? yes no

All Samples(5)  |  Call(0)  |  Derive(0)  |  Import(5)

src/s/p/SpotiChat-Server-HEAD/apps/spotichat.py   SpotiChat-Server(Download)
    raise Exception("Y U no install Redis?")
 
from config import ENVIRONMENT
 
 
 
    logging.info("finding user %s in redis " % username)
    key = ENVIRONMENT['REDIS_PREFIX'] + "users:%s" % (username)
    data = redis_server.get(key)
 
 
        # add our user object to a simple set, keyed by username
        key = ENVIRONMENT['REDIS_PREFIX'] + "users:%s" % key
 
        affected = redis_server.set(key, data)
        ## persistance is handled by redis, or not at all
        self.chat_messages = []
        self.buffer_size = ENVIRONMENT['BUFFER_SIZE'];
        self._load_buffer()
        self.redis_server = redis_server
 
    def _load_buffer(self):
        try:
            ## fill the in memory buffer with redis data here
            key = ENVIRONMENT['REDIS_PREFIX'] + "chat_messages:%s" % self.channel_id

src/s/p/SpotiChat-Server-HEAD/apps/oauth.py   SpotiChat-Server(Download)
from spotichat import get_redis_server
 
from config import ENVIRONMENT
 
try:
 
    logging.info("finding oauth_request_token %s in redis " % token)
    key = ENVIRONMENT['REDIS_PREFIX'] + "oauth_request_token:%s" % (token)
    data = get_redis_server().get(key)
 
 
        # add our user object to a simple set, keyed by username
        key = ENVIRONMENT['REDIS_PREFIX'] + "oauth_request_token:%s" % key
 
        affected = get_redis_server().set(key, username)
    def get(self, settings):
        # we are in development, fake it
        logging.debug( "facebook faking it" );
        user = find_user_by_username(self.username)
        oauth_data = ENVIRONMENT['TEST_OAUTH_DATA']
        oauth_settings = imp.load_source('auth_settings', file)
        settings = oauth_settings.Settings
        if  ENVIRONMENT['DEBUG'] == True:
            return OAuthRedirectorTestHandler.get(self, settings)
 

src/s/p/SpotiChat-Server-HEAD/apps/main.py   SpotiChat-Server(Download)
    raise Exception("Y U no install Redis?")
 
from config import ENVIRONMENT
 
logging.basicConfig(level=logging.DEBUG)
    ## This could be moved into the ChatChannel if performance becomes an issue
    redis_client = redis_server.pubsub()
    redis_client.subscribe(ENVIRONMENT['REDIS_PREFIX'] + 'chat_messages')
    redis_new_chat_messages = redis_client.listen()