Skip to content

Commit 84f07fc

Browse files
committed
Added multiple product and URL compatibility
1 parent 9c44fbd commit 84f07fc

2 files changed

Lines changed: 189 additions & 130 deletions

File tree

README.md

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Amazon Product Advertising API 5.0 wrapper for Python
22
=======================================================
3-
A simple Python wrapper for the last version of the Amazon Product Advertising API.
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.
44

55
[![PyPI](https://img.shields.io/pypi/v/python-amazon-paapi5?color=%231182C2&label=PyPI)](https://pypi.org/project/python-amazon-paapi5/)
66
[![Python](https://img.shields.io/badge/Python-2.x%20%7C%203.x-%23FFD140)](https://www.python.org/)
@@ -12,9 +12,10 @@ A simple Python wrapper for the last version of the Amazon Product Advertising A
1212
Features
1313
--------
1414

15-
* Object oriented interface for simple usage
16-
* Get information about a product through its ASIN
17-
* 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.
1819

1920
Installation
2021
-------------
@@ -23,23 +24,43 @@ You can install or upgrade the module with:
2324

2425
pip install python-amazon-paapi5 --upgrade
2526

26-
Usage
27-
-----
27+
Usage guide
28+
-----------
29+
Basic usage:
2830

2931
from amazon.paapi import AmazonAPI
3032
amazon = AmazonAPI(KEY, SECRET, TAG, COUNTRY)
31-
product = amazon.get_product(asin)
33+
product = amazon.get_product('B01N5IB20Q')
34+
print(product.title)
35+
36+
Get multiple product information:
37+
38+
product = amazon.get_product('B01N5IB20Q,B01F9G43WU')
39+
print(product[0].image_large)
40+
print(product[1].prices.price)
41+
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')
3250

3351
Changelog
3452
-------------
3553

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.
61+
3662
Version 0.1.1
3763
- Added currency support for prices.
3864

3965
Version 0.1.0
4066
-First release.
41-
42-
License
43-
-------
44-
45-
This software is licensed under the GNU General Public License v3.0 that you can check [here](https://github.com/sergioteula/python-amazon-paapi5/blob/master/LICENSE).

0 commit comments

Comments
 (0)