:py:mod:`gnome.utilities.remote_data` ===================================== .. py:module:: gnome.utilities.remote_data .. autoapi-nested-parse:: Download data from remote server Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: gnome.utilities.remote_data.get_datafile Attributes ~~~~~~~~~~ .. autoapisummary:: gnome.utilities.remote_data.data_server gnome.utilities.remote_data.CHUNKSIZE .. py:data:: data_server :value: 'https://gnome.orr.noaa.gov/py_gnome_testdata/' .. py:data:: CHUNKSIZE .. py:function:: get_datafile(filename) Looks to see if filename exists in local directory. If it exists, then it simply returns the 'filename' back as a string. If 'filename' does not exist in the local filesystem, then it tries to download it from the gnome server (http://gnome.orr.noaa.gov/py_gnome_testdata). If it successfully downloads the file, it puts it in the user specified path given in filename and returns the 'filename' string. If file is not found or server is down, it re-throws the HTTPError raised by urllib :param filename: path to the file including filename :type filename: string :exception: raises HTTPError if server is down or file not found on server :returns: returns the string 'filename' once it has been downloaded to user specified location