Automate your grocery shop.
Project description
autogroceries
autogroceries simplifies grocery shopping by using Playwright to automate the addition of ingredients to your basket.
Installation
I recommend using uv to manage the python version, virtual environment and autogroceries installation:
uv venv --python 3.13
source .venv/bin/activate
uv pip install autogroceries
# Install Chromium browser binary required for playwright.
playwright install chromium
Usage
autogroceries uses Playwright to interface with the Sainsbury's website, automatically filling your cart with an inputted list of ingredients.
autogroceries is designed to be used as a CLI tool, with a single command:
❯ autogroceries --help
Usage: autogroceries [OPTIONS]
Automate your grocery shopping using playwright.
Please set the [STORE]_USERNAME and [STORE]_PASSWORD in a .env file in the
same directory you run autogroceries. Replace [STORE] with the store name in
caps e.g. SAINSBURYS_USERNAME.
Options:
--store [sainsburys|waitrose] The store to shop at. [required]
--ingredients-path PATH Path to csv file (without header) detailing
ingredients. Each line should be in the
format 'ingredient,quantity' e.g. 'eggs,2'.
[required]
--log-path PATH If provided, will output shopping log to this
path.
--help Show this message and exit.
The autogroceries CLI expects a .env file in the same directory from where you execute the command. This .env will be loaded by python-dotenv and should define the "[STORE]_USERNAME" and "[STORE]_PASSWORD" variables, with "[STORE]" replaced by the name of the store in uppercase, for instance:
# .env
SAINSBURYS_USERNAME=your_username
SAINSBURYS_PASSWORD=your_password
Demo: autogroceries in action
Your browser does not support the video tag.Disclaimer
️autogroceries is developed for educational use only. Users are responsible for:
- Following website's
robots.txtand Terms of Service. - Using appropriate delays and respecting rate limits.
- Complying with applicable laws.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autogroceries-2.2.1.tar.gz.
File metadata
- Download URL: autogroceries-2.2.1.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89d7f4b9aea068aac914a3cba767738d13612722ded1cd20a0e28d3759ea50e5
|
|
| MD5 |
a9cb74947d720e524fba1b7c83d0fde4
|
|
| BLAKE2b-256 |
e51c62cacab830af965273fccbf6e95abf6ab5de4eaf10147c218961c4da68ee
|
Provenance
The following attestation bundles were made for autogroceries-2.2.1.tar.gz:
Publisher:
test_deploy.yml on dzhang32/autogroceries
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autogroceries-2.2.1.tar.gz -
Subject digest:
89d7f4b9aea068aac914a3cba767738d13612722ded1cd20a0e28d3759ea50e5 - Sigstore transparency entry: 493369028
- Sigstore integration time:
-
Permalink:
dzhang32/autogroceries@402e040c6fb3a0ba59091e92584846c164dc6f55 -
Branch / Tag:
refs/tags/2.2.1 - Owner: https://github.com/dzhang32
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test_deploy.yml@402e040c6fb3a0ba59091e92584846c164dc6f55 -
Trigger Event:
push
-
Statement type:
File details
Details for the file autogroceries-2.2.1-py3-none-any.whl.
File metadata
- Download URL: autogroceries-2.2.1-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd5e51373663f4fe2b90b7537aa20316fd093cb557c8ad32ec48fac714f7b5ce
|
|
| MD5 |
818a910f2740cc83255998fb265b9309
|
|
| BLAKE2b-256 |
57e342ba2c350e35572f09b214177edf5c1d57a03d0ce3265128ba688d02579c
|
Provenance
The following attestation bundles were made for autogroceries-2.2.1-py3-none-any.whl:
Publisher:
test_deploy.yml on dzhang32/autogroceries
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autogroceries-2.2.1-py3-none-any.whl -
Subject digest:
bd5e51373663f4fe2b90b7537aa20316fd093cb557c8ad32ec48fac714f7b5ce - Sigstore transparency entry: 493369056
- Sigstore integration time:
-
Permalink:
dzhang32/autogroceries@402e040c6fb3a0ba59091e92584846c164dc6f55 -
Branch / Tag:
refs/tags/2.2.1 - Owner: https://github.com/dzhang32
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test_deploy.yml@402e040c6fb3a0ba59091e92584846c164dc6f55 -
Trigger Event:
push
-
Statement type: