{"id":26658865,"url":"https://github.com/denisecase/dc-texter","last_synced_at":"2026-02-08T23:36:51.341Z","repository":{"id":97698770,"uuid":"600239334","full_name":"denisecase/dc-texter","owner":"denisecase","description":"Send a text message using Python","archived":false,"fork":false,"pushed_at":"2025-02-04T04:08:17.000Z","size":36,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T10:17:02.520Z","etag":null,"topics":["alerts","data","python","sms-messages","streaming"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/dc-texter/","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/denisecase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2023-02-10T22:39:28.000Z","updated_at":"2025-02-04T04:08:15.000Z","dependencies_parsed_at":"2025-02-03T07:31:23.444Z","dependency_job_id":"10e5cdd7-b8ab-45b0-882d-1677b2d46b92","html_url":"https://github.com/denisecase/dc-texter","commit_stats":null,"previous_names":["denisecase/dc-texter"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fdc-texter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fdc-texter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fdc-texter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fdc-texter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denisecase","download_url":"https://codeload.github.com/denisecase/dc-texter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248413679,"owners_count":21099341,"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","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":["alerts","data","python","sms-messages","streaming"],"created_at":"2025-03-25T10:17:07.715Z","updated_at":"2026-02-08T23:36:46.301Z","avatar_url":"https://github.com/denisecase.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dc-texter\n\n\u003e Send an SMS text alert using Python and Gmail\n\n## Requirements\n\n- Python 3.11+ (required for reading toml files)\n- A configured Gmail Account (see below)\n\n---\n\n## Step 1. Install this Module\n\nRun\n\n```\npip install dc-texter\n```\n\nOr: add `dc-texter` to requirements.txt and install. \n\n---\n\n## Step 2. Configure Application Settings\n\n### Local Development\nFor local development, we can configure our settings with a file.\nFirst, add .env.toml to .gitignore to keep it from being published.\nThen, create a .env.toml file in your project directory with the following.\n```\noutgoing_email_host = \"smtp.gmail.com\"\noutgoing_email_port = 587\noutgoing_email_address = \"youremail@gmail.com\"\noutgoing_email_password = \"aaaabbbbccccdddd\"\nsms_address_for_texts = \"1112224444@msg.fi.google.com\"\n```\n\n### GitHub Action Deployments\nIn a deployment environment like GitHub Actions, the .env.toml file won't be available. Instead, you'll need to set the configuration variables as environment variables.\n\nFirst, add the following secrets to your GitHub repository:\n\n1. Navigate to your repository on GitHub.\n2. Click on Settings \u003e Secrets and variables \u003e Actions.\n3. Click on New repository secret and add the following secrets:\n    - OUTGOING_EMAIL_HOST: Set this to \"smtp.gmail.com\".\n    - OUTGOING_EMAIL_PORT: Set this to 587.\n    - OUTGOING_EMAIL_ADDRESS: Set this to your gmail address.\n    - OUTGOING_EMAIL_PASSWORD: Set this to your application password.\n    - SMS_ADDRESS_FOR_TEXTS: Set this to your phonenumber@your.provider.gateway\n\nNext, reference these secrets in your GitHub Actions workflow. \nFor an example, see [this deploy.yml](https://github.com/denisecase/kafka-producer-earthquake/blob/main/.github/workflows/deploy.yml).\n\n---\n\n## Step 3. Configure Gmail \n\nEnable IMAP\n\n - Open Gmail. Click Settings or ⚙️ in the top-right.\n - Click \"See all settings\". Navigate to \"Forwarding and POP/IMAP\".\n - Under \"IMAP access\", select \"Enable IMAP\" and save changes.\n\nGenerate an App Password\n\n- If you have 2-Step Verification enabled, create an app password for \"dc-mailer\".\n- Copy the 16-character password displayed.\n- Paste the 16-char as your password in .env.toml file. Remove spaces.\n- For detailed instructions, refer to [Google's support page](https://support.google.com/accounts/answer/185833?hl=en).\n\n---\n\n\n## Step 4. Import and Use in a Python Script\n\nOnce installed and your .env.toml file is ready, you can use it in your code. \n\n```python\nfrom dc_texter import send_text\n\nmessage = \"Testing text alerts from Python.\"\n\ntry:\n    send_text(body=message)\n    print(f\"SUCCESS. Text sent: {message}\")\nexcept RuntimeError as e:\n    print(f\"ERROR:  Sending failed: {e}\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisecase%2Fdc-texter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenisecase%2Fdc-texter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisecase%2Fdc-texter/lists"}