Skip to main content

amazon-auth - Sign in to Amazon's consumer website from Python

Version PyPI - Downloads Python Versions Coverage Build Docs GitHub License

amazon-auth is an unofficial library that signs in to Amazon's consumer website (amazon.com and other Amazon sites) and persists the session, so it can be reused from Python. It handles sign-in, OTP and MFA, challenges, and browser sign-in.

Note: This package works by parsing Amazon's consumer-facing website. As Amazon provides no official API to use, older versions of this package may break at any time, so it's recommended that you use the latest version.

Installation

amazon-auth is available on PyPI and can be installed and/or upgraded using pip:

pip install amazon-auth --upgrade

That's it! amazon-auth is now available as a package to your Python projects.

If pinning, be sure to use a wildcard for the minor version (e.g. ==0.2.*, not ==0.2.0) to ensure you always get the latest stable release.

Basic Usage

You'll use AmazonSession to sign in to your Amazon account, then make requests with the signed-in session:

from amazonauth.session import AmazonSession

amazon_session = AmazonSession("<AMAZON_EMAIL>",
                               "<AMAZON_PASSWORD>")
amazon_session.login()

response = amazon_session.get("https://www.amazon.com/gp/css/homepage.html")
print(response.parsed.title.text)

The most secure way to sign in is on Amazon's own page, in a browser window, so your credentials never need to be stored (this requires the browser extra, pip install amazon-auth[browser]):

from amazonauth.contrib.browser.playwright import PlaywrightBrowserLogin
from amazonauth.session import AmazonSession

amazon_session = AmazonSession()
PlaywrightBrowserLogin(amazon_session).login()

The session is persisted, so AmazonSession().login() reuses it without credentials.

Building on amazon-auth

amazon-auth is meant to be built on: packages that read more of Amazon's website, like amazon-orders, subclass its config, session, constants and selectors, and register its CLI commands. See Building on amazon-auth.

Documentation

For more advanced usage, amazon-auth's official documentation is available at Read the Docs.

Contributing

If you would like to get involved, be sure to review the Contribution Guide.

Want to contribute financially? If you've found amazon-auth useful, sponsorship would also be greatly appreciated!

Metadata

Release files for amazon-auth 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for amazon-auth 1.1.1
File Size Uploaded Provenance Actions
amazon_auth-1.1.1.tar.gz 63.0 kB With provenance Details for amazon_auth-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for amazon-auth 1.1.1
File Interpreter ABI Platform Actions
amazon_auth-1.1.1-py3-none-any.whl Python 3 none any Details for amazon_auth-1.1.1-py3-none-any.whl

Total release size: 117.6 kB

Release files / amazon_auth-1.1.1.tar.gz

Download URL amazon_auth-1.1.1.tar.gz
Size 63.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4660c0f889715c50238fd2f99adc9b5f3a920b32aa7360c72040e0fcb650d75b
BLAKE2b-256 checksum
How to use checksums
6b3f38781c52266d9dfcb382fbb1692729889126276e35d9e7fcc2e1e67af9a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / amazon_auth-1.1.1-py3-none-any.whl

Download URL amazon_auth-1.1.1-py3-none-any.whl
Size 54.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c005d107e646234be62a896e5f62ce7f21199e4f87fdc47a68fc6424a35c895e
BLAKE2b-256 checksum
How to use checksums
cdb5e2fc6d24260c0c2270470b465a156aad71e609507538787f7cf9436f9f09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for amazon-auth 1.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for amazon_auth-1.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page