Skip to main content

Access reviewer services on addons.mozilla.org from python

Project description

pyamo - addons.mozilla.org for python

These tools provide some classes and a command line tool to access addons.mozilla.org. This site doesn't have a services API, therefore these tools use website scraping to determine the right information and use the same endpoints as they would be used in the browser.

The command line tool is installed under the name amo and has the following commands available:

info          Show basic information about an add-on
list          List add-ons in the given queue
get           Download one or more versions of an add-on, including sources
run           Run an add-on in Firefox (preferably in a VM)
decide        Make a review decision for an add-on, along with message
logs          Show the review logs

upload        Upload an add-on to addons.mozilla.org

adminget      Show admin manage information about an add-on
adminchange   Change the status of an add-ons and its files using the admin manage page
admindisable  Admin disable one or more add-ons, optionally with a rejection message

Configuration

The amo utility supports setting some configuration values. The file needs to be placed in ~/.amorc on Unix, or %HOME%/amorc.json on Windows.

The defaults section allows to configure defaults for optional arguments. Here are some examples:

{
  "pyamo": {
    "defaults": {
      "out": "--outdir ~/path/to/amofolder --binary ~/path/to/run_in_vm.py",
      "run": "--outdir ~/path/to/amofolder --binary ~/path/to/run_in_vm.py",
      "logs": "-k reviewer",
      "decide": "-f"
    }
  }
}

It is highly recommended to set a the `--outdir` argument as default, to make
sure all add-ons end up in the same folder.

The `auth` section allows to specify an authentication key for redash, which is only necessary for
admin commands.

```json
{
  "auth": {
    "redash_key": "42c85d86fd212538f4394f47c80fa62c"
  }
}

Examples

amo upload

Upload one or more xpi packages. Typical usage is specifying the add-on id, together with one or more occurrences of the -x parameter for each platform. Example:

amo upload lightning \
    -x linux lightning-linux.xpi \
    -x mac lightning-mac.xpi \
    -x win lightning-win32

amo get

Downloads one or more versions to the hard drive for review. Will download both the xpi and the sources and once done extract each package. The files will be saved in a sub-directory named after the addon id in the current (or specified) directory.

When specifying version numbers you can also use the tag latest to retrieve the latest version and the previous tag to get the last accepted version. This is useful when specifying multiple versions to download.

A commonly used option is the diff option -d, which automatically gets the latest and previous versions. This is useful to compare versions.

Example:

amo get -d lightning

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyamo-2.0.0.tar.gz (32.1 kB view details)

Uploaded Source

Built Distribution

pyamo-2.0.0-py3-none-any.whl (36.5 kB view details)

Uploaded Python 3

File details

Details for the file pyamo-2.0.0.tar.gz.

File metadata

  • Download URL: pyamo-2.0.0.tar.gz
  • Upload date:
  • Size: 32.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for pyamo-2.0.0.tar.gz
Algorithm Hash digest
SHA256 fd12edfb08f15f2c96214b5b434b58c2ec04502b30ba02e19feb62af6a963c25
MD5 94ee191f116a086eec7ef1241a7d32d4
BLAKE2b-256 230e424de5799d631dcaa34a7d5f956e943469cd09621053693028b5f46f410e

See more details on using hashes here.

File details

Details for the file pyamo-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyamo-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 36.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for pyamo-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d127a50dbeacd69ced2ab6b9ff094b4c333fc745e5623524a1e69d0c86096195
MD5 9663bc07d01efbcc81bf451c5544edb6
BLAKE2b-256 06fb9108911ac801df0e91ce61c90595a9b3b7c1e0bb711db7a5740c7697d11f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page