Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snacsnoc/grocery-app
Search multiple Canadian grocers at once
https://github.com/snacsnoc/grocery-app
flask python
Last synced: about 1 month ago
JSON representation
Search multiple Canadian grocers at once
- Host: GitHub
- URL: https://github.com/snacsnoc/grocery-app
- Owner: snacsnoc
- License: gpl-3.0
- Created: 2023-01-05T05:55:50.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-10T09:24:53.000Z (7 months ago)
- Last Synced: 2024-06-10T11:11:05.044Z (7 months ago)
- Topics: flask, python
- Language: Python
- Homepage: https://grocerygoose.ca
- Size: 498 KB
- Stars: 11
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Look up multiple Canadian grocers at once
=========================================__Stores:__
* Presidents Choice (Superstore)
* Safeway
* SaveOnFoods
* WalmartThis app uses undocumented APIs to query search results, this project is experimental. To read more about the APIs, see `HACKING.md`
Run Flask:
```
FLASK_DEBUG=True python3 -m flask run
```Runs on:
* Python 3.11
* Smiles__Implementation:__
Using the user's search query, the grocer's individual search API is called. To speed up sending requests, the requests are made in parallel.
The users postal code to lat,long coordinates is cached to disk. This is used for store lookups, eg finding a Walmart within a proximity. This simulates behaviour from the APIs used in mobile apps.
The data is then formatted and normalized and returned to Flask.Data is exposed to Javascript on the search results page and then sorted accordingly.
To use this in your project, or if you're just curious, the most useful files are:
* `supermarket.py` - query grocery stores, as mentioned above
* `product_data_parser.py` - parse the response from a query