This project monitors Allegro offers for bad ratings (1–3 stars) and sends email alerts whenever new negative ratings are detected. It uses the Allegro API, a local SQLite database for tracking offers & ratings, and SMTP for email notifications.
- Authenticates with the Allegro API using OAuth2.
- Fetches active offers and their ratings.
- Detects new bad ratings (
1,2, or3stars). - Stores offers and ratings in a local SQLite database.
- Sends email notifications with bad ratings summary.
- Rate-limited API requests to respect Allegro limits.
- Python 3.10+
- SQLAlchemy — ORM & DB handling
- SQLite — persistent storage
- requests — API requests
- ratelimit — rate limiting
- python-dotenv — environment variables
- smtplib — email sending
git clone https://github.com/veritasdol/Allegro-offers-rating.git
cd Allegro-offers-ratingpython -m venv venv
source venv/bin/activate # Linux / macOS
venv\Scripts\activate # Windowspip install -r requirements.txt
Create a .env file in the project root:
CLIENT_ID=your_allegro_client_id
CLIENT_SECRET=your_allegro_client_secret
REDIRECT_URI=your_redirect_uri
ALLEGRO_API_URL=https://api.allegro.pl
SMTP_SERVER=smtp.example.com
EMAIL_PORT=465
EMAIL_FROM=alerts@example.com
EMAIL_PASSWORD=your_email_password
EMAIL_TO=recipient@example.comThe database (allegro.db) is created automatically on first run. It contains two tables:
- offers — tracked Allegro offers
- ratings — ratings linked to offers
Run the main script:
python main.pyThe script will:
- Fetch all active offers from Allegro.
- Check for new bad ratings.
- Update the database.
- Send an email notification if new bad ratings are found.
MIT License — feel free to use and modify.