|
1 | | -Amazon Product Advertising API V5 wrapper for Python |
| 1 | +Amazon Product Advertising API 5.0 wrapper for Python |
2 | 2 | ======================================================= |
3 | | -A simple Python wrapper for the Amazon Product Advertising API version 5. |
| 3 | +A simple Python wrapper for the last version of the Amazon Product Advertising API. This module allows to get product information from Amazon using the official API in an easier way. |
| 4 | + |
| 5 | +[](https://pypi.org/project/python-amazon-paapi5/) |
| 6 | +[](https://www.python.org/) |
| 7 | +[](https://github.com/sergioteula/python-amazon-paapi5/blob/master/LICENSE) |
| 8 | +[](https://github.com/sergioteula/python-amazon-paapi5/issues) |
| 9 | +[](https://webservices.amazon.com/paapi5/documentation/) |
| 10 | + |
4 | 11 |
|
5 | 12 | Features |
6 | 13 | -------- |
7 | 14 |
|
8 | | -* Object oriented interface for simple usage |
9 | | -* Get information about a product through its ASIN |
10 | | -* More coming in the future |
| 15 | +* Object oriented interface for simple usage. |
| 16 | +* Get information about a product through its ASIN or URL. |
| 17 | +* Get multiple products at once. |
| 18 | +* Ask for new features through the [issues](https://github.com/sergioteula/python-amazon-paapi5/issues) section. |
11 | 19 |
|
12 | 20 | Installation |
13 | 21 | ------------- |
14 | 22 |
|
15 | | - pip install python-amazon-paapi5 |
| 23 | +You can install or upgrade the module with: |
| 24 | + |
| 25 | + pip install python-amazon-paapi5 --upgrade |
| 26 | + |
| 27 | +Usage guide |
| 28 | +----------- |
| 29 | +Basic usage: |
| 30 | + |
| 31 | + from amazon.paapi import AmazonAPI |
| 32 | + amazon = AmazonAPI(KEY, SECRET, TAG, COUNTRY) |
| 33 | + product = amazon.get_product('B01N5IB20Q') |
| 34 | + print(product.title) |
| 35 | + |
| 36 | +Get multiple product information: |
16 | 37 |
|
17 | | -Usage |
18 | | ------ |
| 38 | + product = amazon.get_product('B01N5IB20Q,B01F9G43WU') |
| 39 | + print(product[0].image_large) |
| 40 | + print(product[1].prices.price) |
19 | 41 |
|
20 | | - from amazon.paapi import AmazonAPI |
21 | | - amazon = AmazonAPI(KEY, SECRET, TAG, COUNTRY) |
22 | | - product = amazon.get_product(asin) |
| 42 | +Use URL insted of ASIN: |
| 43 | + |
| 44 | + product = amazon.get_product('https://www.amazon.com/dp/B01N5IB20Q') |
| 45 | + |
| 46 | +Get the ASIN from a URL: |
| 47 | + |
| 48 | + from amazon.paapi import get_asin |
| 49 | + asin = get_asin('https://www.amazon.com/dp/B01N5IB20Q') |
| 50 | + |
| 51 | +Changelog |
| 52 | +------------- |
23 | 53 |
|
| 54 | + Version 1.0.0 |
| 55 | + - Added support for getting multiple product information. |
| 56 | + - Added compatibiliy with Amazon URL search. |
| 57 | + - New function for getting the ASIN for a given URL. |
| 58 | + - Removed Amazon SDK and added as a requirement. |
| 59 | + - Updated docstrings. |
| 60 | + - Updated README with changelog, more examples and badges. |
24 | 61 |
|
25 | | -License |
26 | | -------- |
| 62 | + Version 0.1.1 |
| 63 | + - Added currency support for prices. |
27 | 64 |
|
28 | | -Copyright © 2019 Sergio Abad |
| 65 | + Version 0.1.0 |
| 66 | + -First release. |
0 commit comments