{"id":30768248,"url":"https://github.com/mdhiggins/drug_shortage_bot","last_synced_at":"2025-10-03T19:17:56.390Z","repository":{"id":313127946,"uuid":"1050141888","full_name":"mdhiggins/drug_shortage_bot","owner":"mdhiggins","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-04T03:13:23.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-04T04:42:41.331Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdhiggins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-04T02:29:25.000Z","updated_at":"2025-09-04T03:13:27.000Z","dependencies_parsed_at":"2025-09-04T08:47:23.707Z","dependency_job_id":null,"html_url":"https://github.com/mdhiggins/drug_shortage_bot","commit_stats":null,"previous_names":["mdhiggins/drug_shortage_bot"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mdhiggins/drug_shortage_bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdhiggins%2Fdrug_shortage_bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdhiggins%2Fdrug_shortage_bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdhiggins%2Fdrug_shortage_bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdhiggins%2Fdrug_shortage_bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdhiggins","download_url":"https://codeload.github.com/mdhiggins/drug_shortage_bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdhiggins%2Fdrug_shortage_bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273673221,"owners_count":25147505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-04T21:00:24.524Z","updated_at":"2025-10-03T19:17:51.356Z","avatar_url":"https://github.com/mdhiggins.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Drug Shortages Weekly Report\n\nThis project is a Python script that queries the ASHP Drug Shortages API to generate a weekly summary of drug shortages and sends it via email. The script runs in a Docker container with a cron job to execute every Monday at 9 AM. Configuration files are mounted as volumes for easy updates.\nPrerequisites\n\n## Setup\n\n### Prepare Configuration Files\nCreate a config directory with the following files:\n\nconfig.ini:\n\n```ini\n[email]\nsmtp_server = smtp.gmail.com\nsmtp_port = 587\nsender_email = your_email@example.com\nsender_password = your_app_password\nsubject = Weekly Drug Shortages Summary\n\n[api]\napi_key = your_api_key_here\nbase_url = https://ahfs-staging.firebaseio.com/\n```\n\nReplace smtp_server, smtp_port, sender_email, and sender_password with your SMTP settings. For Gmail with 2FA, generate an App Password.\nObtain api_key from softwaresupport@ashp.org. Staging API example should only be used for testing purposes\n\ndrugs.txt:\n```\n113\n114\n115\n```\n\nList drug shortage keys (one per line).\n\nrecipients.txt:\n```\nrecipient1@example.com\nrecipient2@example.com\n```\n\nList email recipients (one per line).\n\n\n### Run with Docker Compose\nCreate a docker-compose.yml file:\n\n```yaml\nservices:\n  drug-shortages:\n    image: ghcr.io/mdhiggins/drug_shortage_bot:latest\n    container_name: drug-shortages-container\n    restart: unless-stopped\n    volumes:\n      - ./config:/config:ro\n    environment:\n      - TZ=America/New_York\n```\n\nReplace your-username with your GitHub username.\nAdjust TZ to your desired timezone (e.g., America/Los_Angeles).\n\nRun immediately:\n\n```bash\ndocker exec drug-shortages-container /app/venv/bin/python /app/drug_shortages.py --config /config/config.ini --drugs /config/drugs.txt --recipients /config/recipients.txt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdhiggins%2Fdrug_shortage_bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdhiggins%2Fdrug_shortage_bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdhiggins%2Fdrug_shortage_bot/lists"}