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.
{
"auth": {
"redash_key": "42c85d86fd212538f4394f47c80fa62c"
}
}
To set default global arguments (e.g. timeout, cookies, profile), use the global key in pyamo defaults.
For example, you may want to always use a Firefox profile for authentictaion:
{
"pyamo": {
"defaults": {
"global": "-P 78bfnff3.default"
}
}
}
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
Metadata
Release files for pyamo 2.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyamo-2.2.1.tar.gz | 33.7 kB | Without provenance | Details for pyamo-2.2.1.tar.gz |
Release files / pyamo-2.2.1.tar.gz
| Download URL | pyamo-2.2.1.tar.gz |
|---|---|
| Size | 33.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8219b5879bf824c75186b654a48b51c6c31b36ae5a217eeecf072acf2b3684d6
|
|
BLAKE2b-256 checksum How to use checksums |
b3cb716453fb115c4198f04c6e27681ce40c58b7b36794964c13ba87ad762411
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for pyamo 2.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.