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

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/c/o/core-HEAD/openelex/base/state.py   core(Download)
import os
 
from mongoengine import connect, ConnectionError
 
from .cache import StateCache
        else:
            self.state = state
        self.cache = StateCache(self.state)
        # Create mappings directory if it doesn't exist
        self.mappings_dir = os.path.join(PROJECT_ROOT, 'us', self.state, 'mappings')

src/c/o/core-HEAD/openelex/base/archive.py   core(Download)
 
from openelex import settings
from .cache import StateCache
 
 
    def __init__(self, state, bucket='openelex-data'):
        super(BaseArchiver, self).__init__(state)
        self.s3_path = "us/states/%s/raw/" % self.state
        self.local_cache = StateCache(self.state)
        self.conn = S3Connection(settings.AWS_ACCESS_KEY_ID, settings.AWS_SECRET_ACCESS_KEY)