Did I find the right examples for you? yes no

All Samples(11)  |  Call(8)  |  Derive(0)  |  Import(3)
Intelligently loads the data botocore needs.

Handles listing the available services, loading service data & loading
arbitrary data.

Default implementation uses JSON files (the ``JSONFileLoader``) & a plain
cache (``Cache``).

src/b/o/botocore-HEAD/botocore/session.py   botocore(Download)
from botocore import handlers
from botocore.hooks import HierarchicalEmitter, first_non_none_response
from botocore.loaders import Loader
from botocore.provider import get_provider
import botocore.service
        self._session_instance_vars = {}
        if loader is None:
            loader = Loader()
        self._loader = loader
        # _data_paths_added is used to track whether or not we added

src/b/o/botocore-0.42.0/botocore/session.py   botocore(Download)
from botocore import handlers
from botocore.hooks import HierarchicalEmitter, first_non_none_response
from botocore.loaders import Loader
from botocore.provider import get_provider
import botocore.service
        self._session_instance_vars = {}
        if loader is None:
            loader = Loader()
        self._loader = loader
        # _data_paths_added is used to track whether or not we added

src/b/o/botocore-HEAD/tests/unit/test_loaders.py   botocore(Download)
from botocore.loaders import cachable
from botocore.loaders import JSONFileLoader
from botocore.loaders import Loader
import botocore.session
 
    def setUp(self):
        super(LoaderTestCase, self).setUp()
        self.data_path = os.path.join(os.path.dirname(__file__), 'data')
        self.environ['BOTO_DATA_PATH'] = self.data_path
        self.loader = Loader(data_path=self.environ['BOTO_DATA_PATH'])
    def test_data_path_not_required(self):
        loader = Loader()
        self.assertEqual(loader.data_path, '')
        loader.data_path = 'foo:bar'
        self.assertEqual(loader.data_path, 'foo:bar')
            self.data_path
        )
        loader = Loader(data_path=self.environ['BOTO_DATA_PATH'])
        # This should load the data the first data it finds.
        data = loader.load_service_model(
        # The builtin botocore data path is added as the last element
        # so we're only interested in checking the two that we've added.
        loader = Loader(data_path=self.environ['BOTO_DATA_PATH'])
        paths = loader.get_search_paths()[:-1]
        self.assertEqual(paths, ['c:\\path1', 'c:\\path2'])

src/b/o/botocore-HEAD/tests/__init__.py   botocore(Download)
import botocore.loaders
import botocore.session
_LOADER = botocore.loaders.Loader()
 
 
def create_session(**kwargs):
    # Create a Session object.  By default,
    # the _LOADER object is used as the loader
    # so that we reused the same models across tests.
    base_args = {'loader': _LOADER}

src/a/w/aws-cli-HEAD/tests/__init__.py   aws-cli(Download)
 
 
_LOADER = botocore.loaders.Loader()
 
 
def create_clidriver():
    driver = awscli.clidriver.create_clidriver()
    driver.session._loader = _LOADER
        self.environ_patch.start()
        emitter = HierarchicalEmitter()
        session = Session(EnvironmentVariables, emitter, loader=_LOADER)
        load_plugins({}, event_hooks=emitter)
        driver = CLIDriver(session=session)