metadata
title: 'Amazon '
sdk: docker
emoji: 📊
colorFrom: green
colorTo: indigo
Amazon India Price Tracker
A multi-user Amazon price tracker web application designed to be deployed on a Linux VPS.
Features
- Track Amazon India product prices in the background.
- Set target price thresholds.
- View price history graphs.
- Receive alerts via Email when the price drops below your target.
Tech Stack
- Backend: Python 3, Flask, Flask-SQLAlchemy, APScheduler
- Frontend: Vanilla HTML, CSS, JavaScript
- Database: PostgreSQL (Designed for Neon.tech)
- Scraping: ScraperAPI using
requestsandBeautifulSoup - Visualization: Chart.js
Local Setup
Install dependencies:
pip install -r requirements.txtRun the application:
python app.pyThe app uses SQLite by default if
DATABASE_URLis not provided.
Deploying to Hugging Face Docker Space
Create a new Space on Hugging Face.
Select Docker as the Space SDK and choose the Blank template.
Upload all files from this directory to your Space repository.
Go to the Settings tab of your Space and add the following Variables and secrets:
DATABASE_URL: Your PostgreSQL connection string (e.g., from Neon.tech). Format:postgresql://user:password@host/dbnameSMTP_SERVER: The SMTP server for sending emails (e.g.,smtp.gmail.com).SMTP_PORT: The SMTP port (usually587).SMTP_USER: The email address used to send alerts.SMTP_PASSWORD: The app password or password for the SMTP user.TELEGRAM_BOT_TOKEN: Your Telegram Bot token obtained from BotFather.
The Dockerfile is pre-configured to install dependencies and expose port
7860. The Flask app will run onhost='0.0.0.0'andport=7860, which is required by Hugging Face Spaces.
Usage
- Register: Sign up with a username, password, email, and your ScraperAPI key. Optionally, provide a Telegram Chat ID.
- Add Item: Paste an Amazon India product URL and set your target price.
- Dashboard: View your tracked items, current prices, and click "View Graph" to see price history.
- Alerts: The background scheduler runs every hour, checks prices, and sends alerts if the price drops below your target.