mozdownload


Namemozdownload JSON
Version 1.28.0 PyPI version JSON
download
home_pagehttps://github.com/mozilla/mozdownload
SummaryScript to download builds for Firefox and Thunderbird from the Mozilla server.
upload_time2024-03-26 14:34:12
maintainerNone
docs_urlNone
authorMozilla Automation and Testing Team
requires_pythonNone
licenseMozilla Public License 2.0 (MPL 2.0)
keywords mozilla
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # mozdownload

[mozdownload](https://github.com/mozilla/mozdownload)
is a [python package](http://pypi.python.org/pypi/mozdownload)
which handles downloading of Mozilla applications.

[![Coverage](https://coveralls.io/repos/github/mozilla/mozdownload/badge.svg)](https://coveralls.io/github/mozilla/mozdownload)
[![Issues](https://img.shields.io/github/issues/mozilla/mozdownload.svg)](https://github.com/mozilla/mozdownload/issues)

## Installation

If the tool should only be used for downloading applications we propose to
install it via pip. The following command will install the latest release:
```bash
pip install mozdownload
```

Otherwise follow the steps below to setup a development environment. It is
recommended that [virtualenv](http://virtualenv.readthedocs.org/en/latest/installation.html)
and [virtualenvwrapper](http://virtualenvwrapper.readthedocs.org/en/latest/)
be used in conjunction with mozdownload. Start by installing these,
and [creating a virtualenv for the project](https://docs.python-guide.org/dev/virtualenvs/#lower-level-virtualenv).
Then fork our repository into your own github account, and run:
```bash
git clone https://github.com/%your_account%/mozdownload.git
cd mozdownload
python setup.py develop
```

## Command Line Usage

The `mozdownload` command will download the application based on the provided
command line options.

### Examples

Download the latest official Firefox release for your platform:
```bash
mozdownload --version=latest
```

Download the latest official Firefox beta release for your platform:
```bash
mozdownload --version=latest-beta
```

Download the latest official Firefox esr release for your platform:
```bash
mozdownload --version=latest-esr
```

Download the latest Firefox release candidate for your platform:
```bash
mozdownload --type candidate --version=latest
```

Download the latest Firefox Aurora build for Windows (32bit):
```bash
mozdownload --type=daily --branch=mozilla-aurora --platform=win32
```

Download the latest official Thunderbird release for your platform:
```bash
mozdownload --application=thunderbird --version=latest
```

Download the latest Earlybird build for Linux (64bit):
```bash
mozdownload --application=thunderbird --type=daily --branch=comm-aurora --platform=linux64
```

Download this README file:
```bash
mozdownload --url=https://raw.github.com/mozilla/mozdownload/master/README.md
```

Download a file from a URL protected with basic authentication:
```bash
mozdownload --url=http://example.com/secrets.txt --username=admin --password=password
```

Run `mozdownload --help` for detailed information on the command line options.

### Command Line Options

To see the full list of command line options, execute the command below and check the list
of options for the build type to download:
```bash
mozdownload --help
```

## API

Beside the CLI mozdownload also offers an API to be used. To create specific instances of scrapers
the FactoryScraper class can be used. Here some examples:
```python
# Create a release scraper for the German locale of Firefox 40.0.3
from mozdownload import FactoryScraper
scraper = FactoryScraper('release', version='40.0.3', locale='de')

# Create a candidate scraper for Windows 32bit of Firefox 41.0b9
from mozdownload import FactoryScraper
scraper = FactoryScraper('candidate', version='41.0b9', platform='win32')

# Create a daily scraper for the latest Dev Edition build on the current platform
from mozdownload import FactoryScraper
scraper = FactoryScraper('daily', branch='mozilla-aurora')
```

All those scraper instances allow you to retrieve the url which is used to download the files, and the filename for the local destination:
```python
from mozdownload import FactoryScraper
scraper = FactoryScraper('daily')
print(scraper.url)
print(scraper.filename)
```

To actually download the remote file the download() method has to be called:
```python
from mozdownload import FactoryScraper
scraper = FactoryScraper('daily')
filename = scraper.download()
```

## Testing

To run the entire test suite to check if your changes create any errors, run `tox`.

If you only run very specific tests, please specify it via `tox -- -k <keyword>`.
For example, if you are only interested in tests that look at tinderbox builds, run `tox -- -k tinderbox`.
The `-k <keyword>` works for folders, filenames and even names of test methods.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mozilla/mozdownload",
    "name": "mozdownload",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "mozilla",
    "author": "Mozilla Automation and Testing Team",
    "author_email": "tools@lists.mozilla.com",
    "download_url": "https://files.pythonhosted.org/packages/96/81/a635b7840efd71973b58c6f9ab5cdab43d8f9cccd1405e1fb58f0776cb31/mozdownload-1.28.0.tar.gz",
    "platform": null,
    "description": "# mozdownload\n\n[mozdownload](https://github.com/mozilla/mozdownload)\nis a [python package](http://pypi.python.org/pypi/mozdownload)\nwhich handles downloading of Mozilla applications.\n\n[![Coverage](https://coveralls.io/repos/github/mozilla/mozdownload/badge.svg)](https://coveralls.io/github/mozilla/mozdownload)\n[![Issues](https://img.shields.io/github/issues/mozilla/mozdownload.svg)](https://github.com/mozilla/mozdownload/issues)\n\n## Installation\n\nIf the tool should only be used for downloading applications we propose to\ninstall it via pip. The following command will install the latest release:\n```bash\npip install mozdownload\n```\n\nOtherwise follow the steps below to setup a development environment. It is\nrecommended that [virtualenv](http://virtualenv.readthedocs.org/en/latest/installation.html)\nand [virtualenvwrapper](http://virtualenvwrapper.readthedocs.org/en/latest/)\nbe used in conjunction with mozdownload. Start by installing these,\nand [creating a virtualenv for the project](https://docs.python-guide.org/dev/virtualenvs/#lower-level-virtualenv).\nThen fork our repository into your own github account, and run:\n```bash\ngit clone https://github.com/%your_account%/mozdownload.git\ncd mozdownload\npython setup.py develop\n```\n\n## Command Line Usage\n\nThe `mozdownload` command will download the application based on the provided\ncommand line options.\n\n### Examples\n\nDownload the latest official Firefox release for your platform:\n```bash\nmozdownload --version=latest\n```\n\nDownload the latest official Firefox beta release for your platform:\n```bash\nmozdownload --version=latest-beta\n```\n\nDownload the latest official Firefox esr release for your platform:\n```bash\nmozdownload --version=latest-esr\n```\n\nDownload the latest Firefox release candidate for your platform:\n```bash\nmozdownload --type candidate --version=latest\n```\n\nDownload the latest Firefox Aurora build for Windows (32bit):\n```bash\nmozdownload --type=daily --branch=mozilla-aurora --platform=win32\n```\n\nDownload the latest official Thunderbird release for your platform:\n```bash\nmozdownload --application=thunderbird --version=latest\n```\n\nDownload the latest Earlybird build for Linux (64bit):\n```bash\nmozdownload --application=thunderbird --type=daily --branch=comm-aurora --platform=linux64\n```\n\nDownload this README file:\n```bash\nmozdownload --url=https://raw.github.com/mozilla/mozdownload/master/README.md\n```\n\nDownload a file from a URL protected with basic authentication:\n```bash\nmozdownload --url=http://example.com/secrets.txt --username=admin --password=password\n```\n\nRun `mozdownload --help` for detailed information on the command line options.\n\n### Command Line Options\n\nTo see the full list of command line options, execute the command below and check the list\nof options for the build type to download:\n```bash\nmozdownload --help\n```\n\n## API\n\nBeside the CLI mozdownload also offers an API to be used. To create specific instances of scrapers\nthe FactoryScraper class can be used. Here some examples:\n```python\n# Create a release scraper for the German locale of Firefox 40.0.3\nfrom mozdownload import FactoryScraper\nscraper = FactoryScraper('release', version='40.0.3', locale='de')\n\n# Create a candidate scraper for Windows 32bit of Firefox 41.0b9\nfrom mozdownload import FactoryScraper\nscraper = FactoryScraper('candidate', version='41.0b9', platform='win32')\n\n# Create a daily scraper for the latest Dev Edition build on the current platform\nfrom mozdownload import FactoryScraper\nscraper = FactoryScraper('daily', branch='mozilla-aurora')\n```\n\nAll those scraper instances allow you to retrieve the url which is used to download the files, and the filename for the local destination:\n```python\nfrom mozdownload import FactoryScraper\nscraper = FactoryScraper('daily')\nprint(scraper.url)\nprint(scraper.filename)\n```\n\nTo actually download the remote file the download() method has to be called:\n```python\nfrom mozdownload import FactoryScraper\nscraper = FactoryScraper('daily')\nfilename = scraper.download()\n```\n\n## Testing\n\nTo run the entire test suite to check if your changes create any errors, run `tox`.\n\nIf you only run very specific tests, please specify it via `tox -- -k <keyword>`.\nFor example, if you are only interested in tests that look at tinderbox builds, run `tox -- -k tinderbox`.\nThe `-k <keyword>` works for folders, filenames and even names of test methods.\n",
    "bugtrack_url": null,
    "license": "Mozilla Public License 2.0 (MPL 2.0)",
    "summary": "Script to download builds for Firefox and Thunderbird from the Mozilla server.",
    "version": "1.28.0",
    "project_urls": {
        "Homepage": "https://github.com/mozilla/mozdownload"
    },
    "split_keywords": [
        "mozilla"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "14948e4d54ff787d3c8d28f650b6c7137ac2f931c67077f767baad26fddeddd0",
                "md5": "eb826da61ba6a56fc9d0948896bf021f",
                "sha256": "1818cbb8350e04dfe2cfce256b7b13ad7156354bf1e6b40efe647eaa768df8f6"
            },
            "downloads": -1,
            "filename": "mozdownload-1.28.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eb826da61ba6a56fc9d0948896bf021f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 27359,
            "upload_time": "2024-03-26T14:34:10",
            "upload_time_iso_8601": "2024-03-26T14:34:10.095475Z",
            "url": "https://files.pythonhosted.org/packages/14/94/8e4d54ff787d3c8d28f650b6c7137ac2f931c67077f767baad26fddeddd0/mozdownload-1.28.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9681a635b7840efd71973b58c6f9ab5cdab43d8f9cccd1405e1fb58f0776cb31",
                "md5": "ca1fedeccca197d775c3087cb5ac33f6",
                "sha256": "632ca356d7015d5ad370919f8af32811f58993bd5f12880bf65a2c4ebf2a9f60"
            },
            "downloads": -1,
            "filename": "mozdownload-1.28.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ca1fedeccca197d775c3087cb5ac33f6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 25519,
            "upload_time": "2024-03-26T14:34:12",
            "upload_time_iso_8601": "2024-03-26T14:34:12.361524Z",
            "url": "https://files.pythonhosted.org/packages/96/81/a635b7840efd71973b58c6f9ab5cdab43d8f9cccd1405e1fb58f0776cb31/mozdownload-1.28.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-26 14:34:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mozilla",
    "github_project": "mozdownload",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "mozdownload"
}
        
Elapsed time: 0.21161s