Small Python tool to fetch session proposals from a MYS API, filter fields, redact emails, and export CSV.
Features
- Fetch JSON from a MYS API endpoint with Basic authentication (username & password)
- Detect available fields and optionally filter by requested fields
- Remove any columns named like
emailand redact email-like values - Export results to XLSX
- Optional scheduled runs via APScheduler (cron or interval)
- You can run this multiple times and it will update OUTPUT_FILE with the latest data from the API and ignore the user-created columns
Quick start
- Create a virtualenv and install deps:
python -m venv .venv
.venv\\Scripts\\activate # Windows
pip install -r requirements.txt-
Copy
.env.example→.envand configure the environment variables:Required
MYS_USERNAME: API usernameMYS_PASSWORD: API passwordMYS_SHOW_CODE: Show code for the conference
Export
OUTPUT_FILE: Path to the output Excel file (default:proposals.xlsx)FIELDS: Comma-separated list of fields to include. If empty, all available fields except emails are exported.
Scheduling (optional — use one or neither)
SCHEDULE_CRON: Cron expression for scheduled runs (e.g.0 2 * * *for 2 AM daily)SCHEDULE_INTERVAL: Interval in seconds between runs (e.g.3600for hourly)
-
Run once:
python run.py --oncepython run.py --schedule "0 2 * * *"Or use --interval 3600 to run every hour.
Files
- src/exporter.py: core export logic
- src/merger.py: logic to merge latest data into existing file
- src/config.py: environment/config loader
- run.py: CLI and scheduler
From a fresh PowerShell or CommandPrompt:
.venv\\Scripts\\activate # Windows
python run.py --once