pypath.internals.resource.AbstractResource§
- class pypath.internals.resource.AbstractResource(name, ncbi_tax_id=9606, input_method=None, input_args=None, dump=None, data_attr_name=None, **kwargs)[source]§
Bases:
Logger
Generic class for downloading, processing and serving data from a resource.
- __init__(name, ncbi_tax_id=9606, input_method=None, input_args=None, dump=None, data_attr_name=None, **kwargs)[source]§
- namestr
Custom name for the resource.
- input_methodcallable
Method providing the input data.
Methods
__init__
(name[, ncbi_tax_id, input_method, ...])name : str
from_dump
()load
()Loads the data by calling
input_method
.process
()Calls the
_process_method
.save_to_pickle
(pickle_file)Sets the data input method by looking up in
inputs
module if necessary.