Amazon Orders¶
amazon-orders
is an unofficial library that provides a command line
interface alongside a programmatic API that can be used to interact with
Amazon.com’s consumer-facing website.
This works by parsing website data from Amazon.com. A periodic build validates functionality to ensure its stability, but as Amazon provides no official API to use, this package may break at any time. This package only supports the English version of the website.
Installation¶
amazon-orders
is available on
PyPI and can be installed
using pip
:
pip install amazon-orders
That’s it! amazon-orders
is now available as a Python package is
available from the command line.
Basic Usage¶
Execute amazon-orders
from the command line with:
amazon-orders --username <AMAZON_EMAIL> --password <AMAZON_PASSWORD> history
Or use amazon-orders
programmatically:
from amazonorders.session import AmazonSession
from amazonorders.orders import AmazonOrders
amazon_session = AmazonSession("<AMAZON_EMAIL>",
"<AMAZON_PASSWORD>")
amazon_session.login()
amazon_orders = AmazonOrders(amazon_session)
orders = amazon_orders.get_order_history(year=2023)
for order in orders:
print(f"{order.order_number} - {order.grand_total}")
Dive Deeper¶
For more advanced usage, dive deeper in to the rest of the documentation.
Contributing¶
If you find issues, report them on GitHub.
If you would like to contribute to the code, the process is pretty simple:
Familiarise yourself with this package and its dependencies.
Fork the repository on GitHub and start implementing changes.
Write a test that plainly validates the changes made.
Build and test locally with
make local test
Submit a pull requests to get the changes merged.
Also be sure to review the Code of Conduct before submitting issues or pull requests.
Want to contribute financially? If you’ve found amazon-orders
useful, sponsorship
would also be greatly appreciated!