A lightweight daily digest of pharma news, RCTs, and guideline updates — no database needed.
pip install requestsThat's the only external library needed.
Fill in:
ANTHROPIC_API_KEY— from https://console.anthropic.comPUBMED_EMAIL— your email (required by NCBI)NEWS_API_KEY— free from https://newsapi.org (optional but recommended)EMAIL_SENDER/EMAIL_PASSWORD— Gmail + App Password for delivery- In Gmail: Settings → Security → 2-Step Verification → App Passwords
Create a guidelines/ folder and add .txt files with key excerpts:
guidelines/
nccn_nsclc.txt ← paste NCCN NSCLC treatment algorithm text
nccn_breast.txt ← paste NCCN breast cancer key recommendations
ada_standards.txt ← paste ADA Standards of Care key tables
Tip: You don't need the full PDF. Extract just the treatment algorithm tables and key recommendation boxes — 500–1500 words per guideline is enough for Claude to work with.
python run_pipeline.pyRun every morning at 6:30am:
crontab -eAdd this line:
30 6 * * 1-5 cd /path/to/pharma_pipeline && python run_pipeline.py >> logs/pipeline.log 2>&1
On Windows, use Task Scheduler pointing to run_pipeline.py.
pharma_pipeline/
├── config.py ← your settings (don't commit this to git)
├── run_pipeline.py ← entry point
├── fetch_all.py ← PubMed, NewsAPI, ClinicalTrials, openFDA
├── build_prompt.py ← assembles data + guidelines into Claude prompt
├── claude_api.py ← calls Claude and returns report
├── send_report.py ← email or Slack delivery
├── guidelines/ ← your .txt guideline excerpts (create this folder)
└── reports/ ← auto-created, stores daily report archive
| Component | Cost |
|---|---|
| Claude API (~8K tokens/day) | ~$1.50/month |
| PubMed API | Free |
| ClinicalTrials.gov API | Free |
| openFDA API | Free |
| NewsAPI (free tier) | Free (100 req/day) |
| Gmail SMTP | Free |
| Total | ~$1.50/month |
Edit THERAPEUTIC_AREAS in config.py:
- Add new TAs with their own PubMed MeSH terms
- Point to different guideline files
- Adjust
news_keywordsto tune the news filter
If you gain access to SEER or a claims dataset, add a fetch_rwd() function to fetch_all.py following the same pattern, and add a format_rwd() block to build_prompt.py.