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

All Samples(11)  |  Call(0)  |  Derive(0)  |  Import(11)
Installs cache for all ``Requests`` requests by monkey-patching ``Session``

Parameters are the same as in :class:`CachedSession`. Additional parameters:

:param session_factory: Session factory. It should inherit :class:`CachedSession` (default)

        def install_cache(cache_name='cache', backend=None, expire_after=None,
                 allowable_codes=(200,), allowable_methods=('GET',),
                 session_factory=CachedSession, **backend_options):
    """
    Installs cache for all ``Requests`` requests by monkey-patching ``Session``

    Parameters are the same as in :class:`CachedSession`. Additional parameters:

    :param session_factory: Session factory. It should inherit :class:`CachedSession` (default)
    """
    if backend:
        backend = backends.create_backend(backend, cache_name, backend_options)
    _patch_session_factory(
        lambda : session_factory(cache_name=cache_name,
                                  backend=backend,
                                  expire_after=expire_after,
                                  allowable_codes=allowable_codes,
                                  allowable_methods=allowable_methods,
                                  **backend_options)
    )
        


src/a/l/AlfredWorkflow.com-HEAD/Sources/Workflows/Toggl-Time-Tracking/alp/request/requests_cache/__init__.py   AlfredWorkflow.com(Download)
__version__ = '0.2.1'
 
from .core import(
    configure, enabled, disabled, has_url, get_cache,
    delete_url,clear, redo_patch, undo_patch,

src/a/l/AlfredWorkflow.com-HEAD/Sources/Workflows/Rotten-Tomatoes/PyAl/Request/requests_cache/__init__.py   AlfredWorkflow.com(Download)
__version__ = '0.2.1'
 
from .core import(
    configure, enabled, disabled, has_url, get_cache,
    delete_url,clear, redo_patch, undo_patch,

src/a/l/AlfredWorkflow.com-HEAD/Sources/Workflows/KindleBookstore/PyAl/Request/requests_cache/__init__.py   AlfredWorkflow.com(Download)
__version__ = '0.2.1'
 
from .core import(
    configure, enabled, disabled, has_url, get_cache,
    delete_url,clear, redo_patch, undo_patch,

src/a/l/AlfredWorkflow.com-HEAD/Sources/Workflows/delicious/alp/request/requests_cache/__init__.py   AlfredWorkflow.com(Download)
__version__ = '0.2.1'
 
from .core import(
    configure, enabled, disabled, has_url, get_cache,
    delete_url,clear, redo_patch, undo_patch,

src/a/l/AlfredWorkflow.com-HEAD/Sources/Workflows/Command-Help/alp/request/requests_cache/__init__.py   AlfredWorkflow.com(Download)
__version__ = '0.2.1'
 
from .core import(
    configure, enabled, disabled, has_url, get_cache,
    delete_url,clear, redo_patch, undo_patch,

src/a/l/AlfredWorkflow.com-HEAD/Sources/Workflows/Alfred-Time-Keeper/PyAl/Request/requests_cache/__init__.py   AlfredWorkflow.com(Download)
__version__ = '0.2.1'
 
from .core import(
    configure, enabled, disabled, has_url, get_cache,
    delete_url,clear, redo_patch, undo_patch,

src/w/o/Workflows-HEAD/Kindle Bookstore/alp/request/requests_cache/__init__.py   Workflows(Download)
__version__ = '0.2.1'
 
from .core import(
    configure, enabled, disabled, has_url, get_cache,
    delete_url,clear, redo_patch, undo_patch,

src/w/o/Workflows-HEAD/Kindle Bookstore UK/PyAl/Request/requests_cache/__init__.py   Workflows(Download)
__version__ = '0.2.1'
 
from .core import(
    configure, enabled, disabled, has_url, get_cache,
    delete_url,clear, redo_patch, undo_patch,

src/a/l/alfred2-workflow-help-HEAD/alp/request/requests_cache/__init__.py   alfred2-workflow-help(Download)
__version__ = '0.2.1'
 
from .core import(
    configure, enabled, disabled, has_url, get_cache,
    delete_url,clear, redo_patch, undo_patch,

src/r/e/requests-cache-0.4.4/requests_cache/__init__.py   requests-cache(Download)
__version__ = '0.4.4'
 
from .core import(
    CachedSession, install_cache, uninstall_cache,
    disabled, enabled, get_cache, clear, configure

  1 | 2  Next