# Path: ubelt/util_const.py
# class _NoParamType(object):
#     def __new__(cls):
#     def __reduce__(self):
#     def __copy__(self):
#     def __deepcopy__(self, memo):
#     def __str__(cls):
#     def __repr__(cls):
#     def __bool__(self):


from ubelt.util_const import NoParam
from os.path import basename, join, exists, dirname
    from ubelt import ProgIter as Progress
    from ubelt import ensure_app_cache_dir
    from urllib.request import urlopen  # NOQA
    from ubelt.util_platform import ensure_app_cache_dir
        from ubelt import util_hash
import os
    import shutil
    import tempfile
    import hashlib
        import socket
"""
Helpers for downloading data

The :func:`download` function access the network and requests the content at a
specific url using :mod:`urllib` or :mod:`urllib2`. You can either specify
where the data goes or download it to the default location in ubelt cache.
Either way this function returns the location of the downloaded data. You can
also specify the expected hash in order to check the validity of the data. By
default downloading is verbose.

The :func:`grabdata` function is almost identitcal to :func:`download`, but it
checks if the data already exists in the download location, and only downloads
if it needs to.

"""


__all__ = ['download', 'grabdata']


def download(url, fpath=None, dpath=None, fname=None, hash_prefix=None,

# Path: ubelt/util_const.py
# class _NoParamType(object):
#     def __new__(cls):
#     def __reduce__(self):
#     def __copy__(self):
#     def __deepcopy__(self, memo):
#     def __str__(cls):
#     def __repr__(cls):
#     def __bool__(self):


# Path: ubelt/util_download.py
from ubelt.util_const import NoParam
from os.path import basename, join, exists, dirname
    from ubelt import ProgIter as Progress
    from ubelt import ensure_app_cache_dir
    from urllib.request import urlopen  # NOQA
    from ubelt.util_platform import ensure_app_cache_dir
        from ubelt import util_hash
import os
    import shutil
    import tempfile
    import hashlib
        import socket

"""
Helpers for downloading data

The :func:`download` function access the network and requests the content at a
specific url using :mod:`urllib` or :mod:`urllib2`. You can either specify
where the data goes or download it to the default location in ubelt cache.
Either way this function returns the location of the downloaded data. You can
also specify the expected hash in order to check the validity of the data. By
default downloading is verbose.

The :func:`grabdata` function is almost identitcal to :func:`download`, but it
checks if the data already exists in the download location, and only downloads
if it needs to.

"""


__all__ = ['download', 'grabdata']


def download(url, fpath=None, dpath=None, fname=None, hash_prefix=None,

             hasher='sha512', chunksize=8192, verbose=1, timeout=NoParam,