mws

Python wrapper for the Amazon Marketplace Web Service API

https://github.com/python-amazon-mws/python-amazon-mws

Science Score: 23.0%

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

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 55 committers (1.8%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.5%) to scientific vocabulary

Keywords

amazon mws mws-api python python-amazon-mws python3

Keywords from Contributors

energy-system-model
Last synced: 6 months ago · JSON representation

Repository

Python wrapper for the Amazon Marketplace Web Service API

Basic Info
Statistics
  • Stars: 379
  • Watchers: 37
  • Forks: 208
  • Open Issues: 3
  • Releases: 19
Archived
Topics
amazon mws mws-api python python-amazon-mws python3
Created over 9 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog License Authors

README.md

slack CI Testing Coverage

python-amazon-mws

python-amazon-mws is a Python connector to Amazon Marketplace Web Services (or MWS). It provides a simple way to build and send requests to MWS, allowing access to all that MWS can do from your Python application.

Mostly inactive development

Time to maintain this project is limited at present, and the MWS service is being deprecated in favor of the newer Selling Partners API (SP-API).

If you require assistance with this package specifically, please feel free to open an issue. This project may be archived in the near future and development halted.

Installation

Two versions are currently available:

  • Installing mws from PyPI, you will have version 0.8.x, which is built from our master branch.
    • This is a close match to the original package by czpython, with some small tweaks to add critical functionality.
    • Supports Python 2.7 and 3.4+.
  • The updated 1.0devXY version must be installed from this repo's develop branch.
    • This includes additional API coverage that may be missing in 0.8.x, as well as other new features.
    • Some methods have new or updated arguments compared to 0.8.x, and much of the original monolithic mws module has been broken down into separate components (such as the mws.apis collection of modules).
    • Supports Python 3.6+.

Installing 0.8.x (PyPI)

Warning: If you are using version 0.8.x in a production system, note that our eventual 1.0 release will be backwards-incompatible, and may break programs that depend on the 0.8.x version. We advise users pin their Pip-installed version in requirements as mws~=0.8.9.

Install the mws package using Pip:

shell pip install mws

Alternatively, you can install direct from this repo's master branch, like so:

shell pip install git+https://github.com/python-amazon-mws/python-amazon-mws.git@master#egg=mws

Installing 1.0.x-dev (GitHub)

Our develop version can be installed directly from the repo using:

shell pip install git+https://github.com/python-amazon-mws/python-amazon-mws.git@develop#egg=mws

Note that code may be updated at any time as development continues, so please use at your own risk.

Quickstart

Export your API credentials as environment variables in your shell.

shell export MWS_ACCOUNT_ID=... export MWS_ACCESS_KEY=... export MWS_SECRET_KEY=...

Now you can experiment with the API from within an interactive Python shell e.g.

```python

import mws, os ordersapi = mws.Orders( ... accesskey=os.environ['MWSACCESSKEY'], ... secretkey=os.environ['MWSSECRETKEY'], ... accountid=os.environ['MWSACCOUNTID'], ... region='UK', # defaults to 'US' ... ) servicestatus = ordersapi.getservicestatus() servicestatus servicestatus.original '<?xml version="1.0"?>\n\n \n GREEN\n 2017-06-14T16:39:12.765Z\n \n \n affdec68-05d2-4bc5-a8a4-bb40f307dd6b\n \n</ GetServiceStatusResponse>\n' servicestatus.parsed {'value': '\n ', 'Status': {'value': 'GREEN'}, 'Timestamp': {'value': '2017-06-14T16:39:12.765Z'}} servicestatus.response ```

Development

To get started with development, first clone this repo, then install the package locally with extra dependencies:

```shell

development tooling (Black, Flake8, Isort

pip install -e .[develop]

documentation tools

pip install -e .[docs]

both of the above

pip install -e .[develop,docs]

or, just everything

pip install -e .[all] ```

Using pre-commit framework

This project uses the pre-commit framework. This framework installs a Git pre-commit hook that runs scripts as detailed in .pre-commit-config.yaml on commits in your local clone of the repo. These hooks are used to ensure code quality when contributing to the project.

The pre-commit package should already be installed along with installing development requirements (above), but is "opt-in" by design. We highly encourage using it in your local environment. To do so, install the hooks with:

shell pre-commit install

Pre-commit hook scripts will only run against the files that you change within a commit for speed purposes. To run the hooks against all files in the project, use:

shell pre-commit run --all-files

Tests

Tests are run with pytest. To run tests, simply install our dev requirements and then run:

shell pytest

See pytest docs for details on selecting specific tests, rather than the entire test suite, as needed.

We also perform coverage reporting using pytest-cov. You can generate a coverage report locally using:

shell pytest --cov=mws

You may also want to generate a local HTML report to navigate the code and see where coverage is missing:

shell pytest --cov=mws --cov-report html

This will create a htmlcov/ directory, and you can open htmlcov/index.html to view the report in your browser.

The test suite and coverage reporting to Codecov are run automatically in the repo on pushes and pull requests, using GitHub Actions workflows. We test on latest versions of Python 3.5+, and on latest Ubuntu, Mac, and Windows OSes.

Documentation

Docs are built using Sphinx.

To build docs locally, use make:

shell make html

The output HTML documentation will be in docs/build/.

To run a live reloading server serving the HTML documentation (on localhost:8000 or 127.0.0.1:8000 by default):

shell make livehtml

On Windows

make may not be available on Windows, but you can still build documentation with sphinx-build and sphinx-autobuild.

To build the docs locally, use sphinx-build:

shell sphinx-build -b html docs/source docs/build

You can also run a live-reloading server using sphinx-autobuild (on localhost:8000 or 127.0.0.1:8000 by default):

shell sphinx-autobuild docs/source docs/build

Contributing

Please make pull requests to develop. Code coverage isn't necessary but encouraged where possible.

Support

For support using the package, please join our Slack and post in the #help channel.

For support using MWS itself, we advise using the MWS documentation

Owner

  • Name: python-amazon-mws
  • Login: python-amazon-mws
  • Kind: organization

Maintainers of the python-amazon-mws package - not affiliated with Amazon

GitHub Events

Total
  • Watch event: 2
  • Create event: 1
Last Year
  • Watch event: 2
  • Create event: 1

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 432
  • Total Committers: 55
  • Avg Commits per committer: 7.855
  • Development Distribution Score (DDS): 0.639
Past Year
  • Commits: 21
  • Committers: 3
  • Avg Commits per committer: 7.0
  • Development Distribution Score (DDS): 0.429
Top Committers
Name Email Commits
Galen Rice g****e@g****m 156
James Hiew j****s@h****t 75
Paulo Alvarado c****n@g****m 56
pre-commit-ci[bot] 6****] 25
Alex Hellier a****x@a****k 18
Galen Rice g****e@p****m 18
bloodywing b****g@n****t 10
griceturrble t****y@g****m 8
Florian Benkö f****2@w****e 4
Mitalee b****3@y****m 4
John Leith j****h@v****m 3
Mike Patek m****k@g****m 3
Dmitry Kalinin k****a@g****m 3
Galen Rice g****e@a****m 2
KleinerNull a****3@y****e 2
Galen Rice g****e@t****m 2
Kush Goyal k****h@s****m 2
Shalabh Aggarwal s****l@o****n 2
David Zafra Gómez d****a@k****s 2
Alex Hellier a****r@g****m 2
Balram Pariyarath b****h@f****o 1
Bogdan Zagrebin z****n@g****m 1
Daniel Anderson d****l@d****m 1
Eugene Savchenko s****o@g****m 1
Felipe Prenholato p****p@g****m 1
Alberto a****i@g****m 1
Jonas Obrist me@o****h 1
César Francisco Macario Ixcot c****a@g****m 1
Florian Benkö f****e@u****e 1
Josh d****h@g****m 1
and 25 more...

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 48
  • Total pull requests: 72
  • Average time to close issues: 8 months
  • Average time to close pull requests: 15 days
  • Total issue authors: 35
  • Total pull request authors: 13
  • Average comments per issue: 5.25
  • Average comments per pull request: 1.63
  • Merged pull requests: 66
  • Bot issues: 0
  • Bot pull requests: 39
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 33 minutes
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • 854350999 (4)
  • Anthon02 (3)
  • viavacavi (2)
  • iconberg (2)
  • samamorgan (2)
  • Bobspadger (2)
  • Mitalee (2)
  • jugi92 (2)
  • AntoWkill (2)
  • JasonCrowe (2)
  • PiranhaBrands-ZK (1)
  • cajohn2757 (1)
  • btcorgtfo (1)
  • jerry40 (1)
  • yberezkin (1)
Pull Request Authors
  • pre-commit-ci[bot] (47)
  • GriceTurrble (13)
  • Bobspadger (5)
  • samamorgan (3)
  • oxodao (2)
  • Ryan-Daly (1)
  • jtharris-dev (1)
  • mdaif (1)
  • xmo-odoo (1)
  • saleweaver (1)
  • Amedeo91 (1)
  • elcolumbio (1)
  • adamantike (1)
Top Labels
Issue Labels
bug (7) enhancement (3) documentation needed (3) good first issue (1) question (1)
Pull Request Labels
enhancement (6) bug (5) documentation (4) housekeeping (4)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 19,302 last-month
  • Total docker downloads: 62
  • Total dependent packages: 0
  • Total dependent repositories: 17
  • Total versions: 16
  • Total maintainers: 3
pypi.org: mws

Python library for interacting with the Amazon MWS API

  • Versions: 16
  • Dependent Packages: 0
  • Dependent Repositories: 17
  • Downloads: 19,302 Last month
  • Docker Downloads: 62
Rankings
Downloads: 1.5%
Forks count: 3.2%
Docker downloads count: 3.3%
Stargazers count: 3.3%
Dependent repos count: 3.5%
Average: 4.1%
Dependent packages count: 10.1%
Last synced: 6 months ago

Dependencies

.github/workflows/ci.yaml actions
  • ./.github/workflows/composite/setup-dev-dependencies * composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v2 composite
  • pre-commit/action v3.0.0 composite
.github/workflows/composite/setup-dev-dependencies/action.yml actions
  • actions/cache v3 composite
  • actions/setup-python v4 composite
docs/requirements.txt pypi
  • sphinx >=3.4.3,<3.5
  • sphinx-autobuild >=0.7.1
  • sphinx-rtd-theme *
setup.py pypi
  • defusedxml >=0.7.1
  • requests *
  • xmltodict >=0.12.0