class_docstr: Mixin class for Satpy components to download files.
  
  This class simplifies the logic needed to download and cache data files
  needed for operations in a Satpy component (readers, writers, etc). It
  does this in a two step process where files that might be downloaded are
  "registered" and then "retrieved" when they need to be used.
  
  To use this class include it as one of the subclasses of your Satpy
  component. Then in the ``__init__`` method, call the
  ``register_data_files`` function during initialization.
  
  .. note::
  
      This class is already included in the ``FileYAMLReader`` and
      ``Writer`` base classes. There is no need to define a custom
      class.
  
  The below code is shown as an example::
  
      from satpy.readers.yaml_reader import AbstractYAMLReader
      from satpy.aux_download import DataDownloadMixin
  
      class MyReader(AbstractYAMLReader, DataDownloadMixin):
          def __init__(self, *args, **kwargs):
              super().__init__(*args, **kwargs)
              self.register_data_files()
  
  This class expects data files to be configured in either a
  ``self.info['data_files']`` (standard for readers/writers) or
  ``self.config['data_files']`` list. The ``data_files`` item
  itself is a list of dictionaries. This information can also be
  passed directly to ``register_data_files`` for more complex cases.
  In YAML, for a reader, this might look like this::
  
      reader:
          name: abi_l1b
          short_name: ABI L1b
          long_name: GOES-R ABI Level 1b
          ... other metadata ...
          data_files:
            - url: "https://example.com/my_data_file.dat"
            - url: "https://raw.githubusercontent.com/pytroll/satpy/main/README.rst"
              known_hash: "sha256:5891286b63e7745de08c4b0ac204ad44cfdb9ab770309debaba90308305fa759"
            - url: "https://raw.githubusercontent.com/pytroll/satpy/main/RELEASING.md"
              filename: "satpy_releasing.md"
  
  In this example we register two files that might be downloaded.
  If ``known_hash`` is not provided or None (null in YAML) then the data
  file will not be checked for validity when downloaded. See
  :func:`~satpy.aux_download.register_file` for more information. You can
  optionally specify ``filename`` to define the in-cache name when this file
  is downloaded. This can be useful in cases when the filename can not be
  easily determined from the URL.
  
  When it comes time to needing the file, you can retrieve the local path
  by calling ``~satpy.aux_download.retrieve(cache_key)`` with the
  "cache key" generated during registration. These keys will be in the
  format: ``<component_type>/<filename>``. For a
  reader this would be ``readers/satpy_release.md``.
  
  This Mixin is not the only way to register and download files for a
  Satpy component, but is the most generic and flexible. Feel free to
  use the :func:`~satpy.aux_download.register_file` and
  :func:`~satpy.aux_download.retrieve` functions directly.
  However, :meth:`~satpy.aux_download.find_registerable_files` must also
  be updated to support your component (if files are not register during
  initialization).
class_docstr_tok: ["Mixin","class","for","Satpy","components","to","download","files",".","This","class","simplifies","the","logic","needed","to","download","and","cache","data","files","needed","for","operations","in","a","Satpy","component","(","readers",",","writers",",","etc",")",".","It","does","this","in","a","two","step","process","where","files","that","might","be","downloaded","are","''","registered","''","and","then","``","retrieved","''","when","they","need","to","be","used",".","To","use","this","class","include","it","as","one","of","the","subclasses","of","your","Satpy","component",".","Then","in","the","``","__init__","``","method",",","call","the","``","register_data_files","``","function","during","initialization",".","..","note",":",":","This","class","is","already","included","in","the","``","FileYAMLReader","``","and","``","Writer","``","base","classes",".","There","is","no","need","to","define","a","custom","class",".","The","below","code","is","shown","as","an","example",":",":","from","satpy.readers.yaml_reader","import","AbstractYAMLReader","from","satpy.aux_download","import","DataDownloadMixin","class","MyReader","(","AbstractYAMLReader",",","DataDownloadMixin",")",":","def","__init__","(","self",",","*","args",",","*","*","kwargs",")",":","super","(",")",".__init__","(","*","args",",","*","*","kwargs",")","self.register_data_files","(",")","This","class","expects","data","files","to","be","configured","in","either","a","``","self.info","[","'data_files","'","]","``","(","standard","for","readers\/writers",")","or","``","self.config","[","'data_files","'","]","``","list",".","The","``","data_files","``","item","itself","is","a","list","of","dictionaries",".","This","information","can","also","be","passed","directly","to","``","register_data_files","``","for","more","complex","cases",".","In","YAML",",","for","a","reader",",","this","might","look","like","this",":",":","reader",":","name",":","abi_l1b","short_name",":","ABI","L1b","long_name",":","GOES-R","ABI","Level","1b","...","other","metadata","...","data_files",":","-","url",":","``","https",":","\/\/example.com\/my_data_file.dat","''","-","url",":","``","https",":","\/\/raw.githubusercontent.com\/pytroll\/satpy\/main\/README.rst","''","known_hash",":","``","sha256:5891286b63e7745de08c4b0ac204ad44cfdb9ab770309debaba90308305fa759","''","-","url",":","``","https",":","\/\/raw.githubusercontent.com\/pytroll\/satpy\/main\/RELEASING.md","''","filename",":","``","satpy_releasing.md","''","In","this","example","we","register","two","files","that","might","be","downloaded",".","If","``","known_hash","``","is","not","provided","or","None","(","null","in","YAML",")","then","the","data","file","will","not","be","checked","for","validity","when","downloaded",".","See",":","func",":","`","~satpy.aux_download.register_file","`","for","more","information",".","You","can","optionally","specify","``","filename","``","to","define","the","in-cache","name","when","this","file","is","downloaded",".","This","can","be","useful","in","cases","when","the","filename","can","not","be","easily","determined","from","the","URL",".","When","it","comes","time","to","needing","the","file",",","you","can","retrieve","the","local","path","by","calling","``","~satpy.aux_download.retrieve","(","cache_key",")","``","with","the","''","cache","key","''","generated","during","registration",".","These","keys","will","be","in","the","format",":","``","<","component_type",">","\/","<","filename",">","``",".","For","a","reader","this","would","be","``","readers\/satpy_release.md","``",".","This","Mixin","is","not","the","only","way","to","register","and","download","files","for","a","Satpy","component",",","but","is","the","most","generic","and","flexible",".","Feel","free","to","use","the",":","func",":","`","~satpy.aux_download.register_file","`","and",":","func",":","`","~satpy.aux_download.retrieve","`","functions","directly",".","However",",",":","meth",":","`","~satpy.aux_download.find_registerable_files","`","must","also","be","updated","to","support","your","component","(","if","files","are","not","register","during","initialization",")","."]
docstr: Register a series of files that may be downloaded later.
  
  See :class:`~satpy.aux_download.DataDownloadMixin` for more
  information on the assumptions and structure of the data file
  configuration dictionary.
docstr_tok: ["Register","a","series","of","files","that","may","be","downloaded","later",".","See",":","class",":","`","~satpy.aux_download.DataDownloadMixin","`","for","more","information","on","the","assumptions","and","structure","of","the","data","file","configuration","dictionary","."]
code: def register_data_files(self, data_files=None):
      """Register a series of files that may be downloaded later.
  
      See :class:`~satpy.aux_download.DataDownloadMixin` for more
      information on the assumptions and structure of the data file
      configuration dictionary.
  
      """
      comp_type = self._data_file_component_type
      if data_files is None:
          df_parent = getattr(self, "info", self.config)
          data_files = df_parent.get("data_files", [])
      cache_keys = []
      for data_file_entry in data_files:
          cache_key = self._register_data_file(
              data_file_entry, comp_type
          )
          cache_keys.append(cache_key)
      return cache_keys
  
imports: import logging
  import os
  import pooch
  import satpy
label_desc: Use image node_id 2 for calling the DataDownloadMixin obj's underlying member method code with example usage: obj.register_data_files(data_files) and returns: cache_keys