{"id":38656694,"url":"https://github.com/ali-zahedi/az-messaging","last_synced_at":"2026-01-17T09:28:38.749Z","repository":{"id":57413517,"uuid":"357133736","full_name":"ali-zahedi/az-messaging","owner":"ali-zahedi","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-10T14:33:42.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-11T04:25:21.987Z","etag":null,"topics":["aws","django","kavenegar","messaging","multiple-sites","python","sms","sns","twilio"],"latest_commit_sha":null,"homepage":"","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/ali-zahedi.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}},"created_at":"2021-04-12T09:28:23.000Z","updated_at":"2026-01-10T14:33:47.000Z","dependencies_parsed_at":"2022-08-27T23:00:24.306Z","dependency_job_id":null,"html_url":"https://github.com/ali-zahedi/az-messaging","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/ali-zahedi/az-messaging","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-zahedi%2Faz-messaging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-zahedi%2Faz-messaging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-zahedi%2Faz-messaging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-zahedi%2Faz-messaging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ali-zahedi","download_url":"https://codeload.github.com/ali-zahedi/az-messaging/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-zahedi%2Faz-messaging/sbom","scorecard":{"id":183438,"data":{"date":"2025-08-11","repo":{"name":"github.com/ali-zahedi/az-messaging","commit":"ecc626e6be3f58a9ec166923623c144c86d2734e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T19:19:11.054Z","repository_id":57413517,"created_at":"2025-08-16T19:19:11.054Z","updated_at":"2025-08-16T19:19:11.054Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28505560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aws","django","kavenegar","messaging","multiple-sites","python","sms","sns","twilio"],"created_at":"2026-01-17T09:28:38.618Z","updated_at":"2026-01-17T09:28:38.717Z","avatar_url":"https://github.com/ali-zahedi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--![GitHub All Releases](https://img.shields.io/github/downloads/ali-zahedi/az-messaging/total)--\u003e\n\u003c!--![GitHub issues](https://img.shields.io/github/issues/ali-zahedi/az-messaging)--\u003e\n![GitHub](https://img.shields.io/github/license/ali-zahedi/az-messaging)\n![GitHub](https://img.shields.io/pypi/pyversions/az-messaging.svg?maxAge=2592000)\n![GitHub](https://img.shields.io/pypi/v/az-messaging.svg?maxAge=2592000)\n# AZ Messaging config\n\n[[_TOC_]]\n\n## Install with `pip`\n\n```shell script\npip install az-messaging\n```\n\n### settings.py\n\n \n ``` python\nINSTALLED_APPS = [\n    # ....\n    'azmessaging',\n    # ...\n]\n\nAZ_MESSAGING = {\n    'SETTING_VALUE_READER_CLASS': 'azmessaging.readers.DefaultReader',\n    'CLASS': {\n        'SMS': 'azmessaging.channels.SMSNotificationChannel',\n        'TELEGRAM': 'azmessaging.channels.TelegramNotificationChannel',\n        'PUSH': 'azmessaging.channels.PushNotificationChannel',\n    },\n    'TELEGRAM': {\n        'SERVICE_PROVIDER': {\n            'DEFAULT': {\n                'CLASS': 'azmessaging.telegram.TELEGRAMAPIDefaultAPI',\n                'api_key': os.environ.get('TELEGRAM_DEFAULT_API_KEY', None),\n                'api_server': os.environ.get('TELEGRAM_DEFAULT_API_SERVER', None),\n            },\n        },\n        'DEFAULT_SERVICE_PROVIDER': 'DEFAULT',  # REQUIRED\n        'PRIORITY_SERVICE_PROVIDER': [  # REQUIRED\n            'DEFAULT',\n        ],\n    },\n    'SMS': {\n        'SERVICE_PROVIDER': {\n            'SNS': {\n                'CLASS': 'azmessaging.sms.SMSAPISNSAmazon',\n                'ROUTING': [\n                    {\n                        'countries': 'UK, US',\n                        'region_name': 'eu-west-1'\n                    },\n                    {\n                        'continents': 'EUROPE, AFRICA',\n                        'region_name': 'eu-west-2'\n                    }\n                ],\n                'key_id': os.environ.get('AWS_ACCESS_KEY_ID', None),\n                'access_key': os.environ.get('AWS_SECRET_ACCESS_KEY', None),\n                'region_name': os.environ.get('AWS_SNS_DEFAULT_REGION', None),\n            },\n            'TWILIO': {\n                'CLASS': 'azmessaging.sms.SMSAPITwilio',\n                'ROUTING': [\n                    {\n                        'countries': 'DE, EE',\n                        'sender': os.environ.get('TWILIO_EE_SENDER', None),\n                    },\n                    {\n                        'continents': 'ASIA',\n                        'sender': os.environ.get('TWILIO_ASIA_SENDER', None),\n                    }\n                ],\n                'account_sid': os.environ.get('TWILIO_ACCOUNT_SID', None),\n                'auth_token': os.environ.get('TWILIO_AUTH_TOKEN', None),\n                'sender': os.environ.get('TWILIO_DEFAULT_SENDER', None),\n            },\n        },\n        'DEFAULT_SERVICE_PROVIDER': 'SNS',  # REQUIRED\n        'PRIORITY_SERVICE_PROVIDER': [      # REQUIRED\n            'TWILIO',\n            'SNS',\n        ],\n        'WHITE_LIST': '__all__',    # EXAMPLE = 'COUNTRY_CODE_1, COUNTRY_CODE_2' \n        'BLACK_LIST': '__none__',   # EXAMPLE = '__all__' OR 'COUNTRY_CODE_3, COUNTRY_CODE_4'\n    },\n    'PUSH': {\n        'SERVICE_PROVIDER': {\n            'FCMDJANGO': {\n                'CLASS': 'azmessaging.pushnotifications.fcmdjango.FCMDjangoAPI',\n                'api_key': os.environ.get('FCM_SERVER_KEY', None),\n            },\n        },\n        'DEFAULT_SERVICE_PROVIDER': 'FCMDJANGO',  # REQUIRED\n        'PRIORITY_SERVICE_PROVIDER': [  # REQUIRED\n            'FCMDJANGO',\n        ],\n    },\n}\n ```\n\n### Migrate\n\n```\npython manage.py migrate\n```\n\n### SMS\n\n#### Support\n\n1. [SNS AWS](https://aws.amazon.com/sns/)\n1. [Twilio](https://www.twilio.com/sms)\n\n#### How to use it?\n\nBase on sample config, two sms send from `twilio` with `TWILIO_EE_SENDER` number and one of them from `AWS-SNS` and region is `eu-west-1`.\n \n```python\nfrom azmessaging import default_settings as settings\nfrom azmessaging.models import SMSNotificationType\nidentifier = 'what ever you want'\nmessage = 'Your code is: 1222'\nsms_type = SMSNotificationType.TRANSACTIONAL\nklass = settings.READER.klass('sms', identifier)\nsms = klass(identifier=identifier, message=message, sms_type=sms_type)\nsms.set_receivers(['+16503331111', '+37211123450', '+37211123451'])\nsms.notify()\n```\n\n### Telegram\n\n\n#### How to use it?\n \n```python\nfrom azmessaging import default_settings as settings\nidentifier = 'what ever you want'\nmessage = 'Your code is: 1222'\nklass = settings.READER.klass('telegram', identifier)\ntelegram = klass(identifier=identifier, message=message)\ntelegram.set_receivers(['user_a', 'user_b', ])\ntelegram.notify()\n```\n\n### Push notification\n\n\n#### How to use it?\n \n```python\nfrom azmessaging import default_settings as settings\nidentifier = 'what ever you want'\nmessage = 'Your code is: 1222'\ntitle = 'OTP'\nimage_url = 'https://example.com/1.png' \nklass = settings.READER.klass('push', identifier)\npush_notification = klass(identifier=identifier, message=message, title=title, image_url=image_url, payload_data={})\npush_notification.set_receivers(['user_a', 'user_b', ])\npush_notification.notify()\n```\n\n# TODO\n\n- [ ] Documentation\n\n- [x] Support multiple provider \n\n- [X] SMS Support\n\n- [X] SMS Support SNS AWS\n\n- [X] SMS Support Twilio\n\n- [X] SMS Routing Base on country/continents\n\n- [x] SMS Support every provider you want.\n\n- [X] SMS Batch \n\n- [X] Push notification\n\n- [ ] Console\n\n- [ ] Websocket\n\n- [X] Telegram\n\n## Develop\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fali-zahedi%2Faz-messaging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fali-zahedi%2Faz-messaging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fali-zahedi%2Faz-messaging/lists"}