download

A quick helper module to download files online.

https://github.com/choldgraf/download

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 7 committers (14.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

A quick helper module to download files online.

Basic Info
  • Host: GitHub
  • Owner: choldgraf
  • License: mit
  • Language: Python
  • Default Branch: master
  • Size: 1.25 MB
Statistics
  • Stars: 48
  • Watchers: 1
  • Forks: 16
  • Open Issues: 12
  • Releases: 0
Created about 9 years ago · Last pushed over 4 years ago
Metadata Files
Readme License

README.rst

⚠️⚠️This package is not actively maintained⚠️⚠️

Download
--------

⚠️⚠️This package is not actively maintained⚠️⚠️

**Instead, I recommend that you use `pooch `_ which has more features, better implementation, and active maintenance.**

A no-frills tool to download files from the web. It will
attempt to be smart about not downloading data that's
already there, checking to make sure that
there were no errors in fetching data, automatically unzipping the contents
of downloaded zipfiles (if desired), and displaying a progress bar with
statistics.

.. note::

    This draws heavily from the
    `MNE-python `_ ``_fetch_file`` function.

_This package doesn't get a ton of developer attention, but is hopefully well-scoped
enough that it should still be useful! If you'd like to help improve it, fix bugs, etc,
please reach out in the issues!_

Installation
------------

Either clone this repository and install with::

  python setup.py install

or, simply install with ``pip``::

  pip install download

Usage
-----

Download a file on the web is as easy as::

  from download import download
  path = download(url, file_path)

a file called ``file_name`` will be downloaded to the folder of ``file_path``.

File types
^^^^^^^^^^

If your file is a zip file, you can add the flag::

  path = download(url, file_path, kind="zip")

in this case, the file will be downloaded, and then unzipped into the folder
specified by `file_name`.

Supported formats are `'file', 'zip', 'tar', 'tar.gz'`
Defaults to `file`.

Progress bar
^^^^^^^^^^^^

Whether to display a progress bar during file download.
Defaults to `True`::

  path = download(url, file_path, progressbar=True)

Replace
^^^^^^^

If `True` and the URL points to a single file, overwrite the old file if possible.
Defaults to `False`::

  path = download(url, file_path, replace=False)

Timeout
^^^^^^^

The URL open timeout in seconds.
Defaults to 10 seconds::

  path = download(url, file_path, timeout=10)

Verbose
^^^^^^^

Whether to print download status to the screen.
Defaults to `True`::

  path = download(url, file_path, verbose=True)


Frequently Asked Questions
--------------------------

.. _faq/file-size:

Why do I occasionally get a "Error file size is..." error?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Occasionally, when you try to download a file, the server from
which you are downloading will return that the download is finished,
when it is not. ``download`` will check whether the final downloaded
file is the correct size. If not, it will throw this error. In this case,
you should try re-downloading the file.

Owner

  • Name: Chris Holdgraf
  • Login: choldgraf
  • Kind: user
  • Location: California
  • Company: UC Berkeley

I work with Project Jupyter and other open communities to build tools and solve problems for scientific research and education.

GitHub Events

Total
  • Issues event: 3
  • Watch event: 1
Last Year
  • Issues event: 3
  • Watch event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 73
  • Total Committers: 7
  • Avg Commits per committer: 10.429
  • Development Distribution Score (DDS): 0.534
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Chris Holdgraf c****f@b****u 34
Chris Holdgraf c****f@g****m 15
Nikolay Korolev C****n@m****u 11
DanielDevBR d****x@g****m 8
Niels Vadot 4****t@u****m 3
DanielDevBR f****1@g****m 1
Jean-Baptiste SCHIRATTI j****i@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 24
  • Total pull requests: 27
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 15 days
  • Total issue authors: 12
  • Total pull request authors: 7
  • Average comments per issue: 1.29
  • Average comments per pull request: 1.96
  • Merged pull requests: 23
  • Bot issues: 1
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 0
  • Average time to close issues: about 1 month
  • Average time to close pull requests: N/A
  • Issue authors: 2
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 1
  • Bot pull requests: 0
Top Authors
Issue Authors
  • CrafterKolyan (6)
  • jasonyun (4)
  • choldgraf (3)
  • eseiver (3)
  • jbschiratti (1)
  • linear[bot] (1)
  • ferion11 (1)
  • poke1024 (1)
  • brycefisher (1)
  • ninivert (1)
  • codeskyblue (1)
  • konhi (1)
Pull Request Authors
  • choldgraf (12)
  • CrafterKolyan (8)
  • ferion11 (3)
  • jbschiratti (1)
  • brycefisher (1)
  • leouieda (1)
  • ninivert (1)
Top Labels
Issue Labels
enhancement (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 84,635 last-month
  • Total docker downloads: 163
  • Total dependent packages: 22
    (may contain duplicates)
  • Total dependent repositories: 95
    (may contain duplicates)
  • Total versions: 10
  • Total maintainers: 1
pypi.org: download

A quick module to help downloading files using python.

  • Versions: 9
  • Dependent Packages: 20
  • Dependent Repositories: 95
  • Downloads: 84,635 Last month
  • Docker Downloads: 163
Rankings
Dependent packages count: 0.7%
Dependent repos count: 1.5%
Docker downloads count: 2.6%
Downloads: 3.5%
Average: 4.5%
Forks count: 8.9%
Stargazers count: 9.7%
Maintainers (1)
Last synced: 11 months ago
conda-forge.org: download
  • Versions: 1
  • Dependent Packages: 2
  • Dependent Repositories: 0
Rankings
Dependent packages count: 19.5%
Average: 31.5%
Dependent repos count: 34.0%
Forks count: 34.7%
Stargazers count: 37.7%
Last synced: 11 months ago

Dependencies

examples/example_requirements.txt pypi
  • matplotlib *
  • numpy *
  • pandas *
setup.py pypi
  • tqdm *