# EventRate Local Python application that identifies upcoming Toronto events likely to increase Airbnb demand, sends Telegram alerts, and optionally adjusts nightly prices via Playwright automation. ## Quick start ```bash # 1. Clone and enter git clone https://git.levkin.ca/ilia/AtAnyRate.git cd AtAnyRate # 2. Create a virtual environment python3 -m venv .venv source .venv/bin/activate # 3. Install dependencies pip install -r requirements.txt playwright install chromium # 4. Configure cp .env.example .env # Edit .env with your API keys (see below) # 5. Run python -m src.main --dry-run # preview only, no side effects python -m src.main --alerts-only # fetch events + send Telegram python -m src.main # full flow (alerts + Airbnb update) ``` ## Environment variables | Variable | Required | Description | |---|---|---| | `TICKETMASTER_KEY` | Yes | Ticketmaster Discovery API key (free tier) | | `SEATGEEK_CLIENT_ID` | Yes | SeatGeek API client ID (free tier) | | `TELEGRAM_BOT_TOKEN` | Yes | Telegram bot token from @BotFather | | `TELEGRAM_CHAT_ID` | Yes | Your Telegram chat/user ID | | `AIRBNB_LISTING_ID` | No | Airbnb listing ID for calendar automation | | `AIRBNB_BASE_PRICE` | No | Base nightly price (CAD) | | `PRICE_INCREASE_PCT` | No | Price increase percentage for event dates (default: 20) | | `LOOKAHEAD_DAYS` | No | Days ahead to scan for events (default: 30) | | `LOG_LEVEL` | No | Logging level (default: INFO) | ## Airbnb session setup (one-time) ```bash python scripts/airbnb_login.py ``` This opens a headed browser. Log in manually, complete any 2FA, then press Enter in the terminal. Your session is saved to `state.json` for reuse in headless runs. ## Running on cron ```bash # Weekly Monday 8 AM 0 8 * * 1 cd /path/to/AtAnyRate && .venv/bin/python -m src.main --alerts-only >> /var/log/eventrate.log 2>&1 ``` ## Docker ```bash docker build -t eventrate . docker run --rm --env-file .env -v $(pwd)/state.json:/app/state.json eventrate ``` ## Project docs - [PROJECT.md](PROJECT.md) — goals, scope, constraints - [ARCHITECTURE.md](ARCHITECTURE.md) — system design and module map - [BACKLOG.md](BACKLOG.md) — feature backlog and task breakdown