pypath.share.curl.cache_off§

class pypath.share.curl.cache_off[source]§

Bases: _global_context_off

This is a context handler to turn off pypath.curl.Curl() cache. Data will be downloaded even if it exists in cache.

Behind the scenes it sets the value of the pypath.curl.CACHE module level variable to False (by default it is None).

Example:

import pypath
from pypath import curl, data_formats

pa = pypath.PyPath()

print('`curl.CACHE` is ', curl.CACHE)

with curl.cache_on():
    print('`curl.CACHE` is ', curl.CACHE)
    pa.load_resources({'signor': data_formats.pathway['signor']})
__init__()[source]§
Parameters:

name (str) – Name of the module level variable.

Methods

__init__()

param str name:

Name of the module level variable.