{"id":19640137,"url":"https://github.com/gearplug/mailrelay-python","last_synced_at":"2025-09-01T03:16:05.601Z","repository":{"id":39579254,"uuid":"491272235","full_name":"GearPlug/mailrelay-python","owner":"GearPlug","description":"python-mailrelay is an API wrapper for Mailrelay written in Python.","archived":false,"fork":false,"pushed_at":"2023-05-12T19:14:13.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-27T05:37:20.404Z","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/GearPlug.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}},"created_at":"2022-05-11T21:06:47.000Z","updated_at":"2022-05-31T22:11:36.000Z","dependencies_parsed_at":"2025-01-09T18:53:23.833Z","dependency_job_id":"de4fb990-d7ac-42ad-b25e-783c37d49a65","html_url":"https://github.com/GearPlug/mailrelay-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GearPlug/mailrelay-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GearPlug%2Fmailrelay-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GearPlug%2Fmailrelay-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GearPlug%2Fmailrelay-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GearPlug%2Fmailrelay-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GearPlug","download_url":"https://codeload.github.com/GearPlug/mailrelay-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GearPlug%2Fmailrelay-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273068857,"owners_count":25039911,"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-01T02:00:09.058Z","response_time":120,"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":"2024-11-11T14:04:45.662Z","updated_at":"2025-09-01T03:16:05.571Z","avatar_url":"https://github.com/GearPlug.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# python-mailrelay\npython-mailrelay is an API wrapper for Mailrelay written in Python.\n\n## Installing\n```\npip install mailrelay-python\n```\n## Before start\nTo use Mailrelay Python, go user dashboard anf get the API KEY\n\n## Usage\n### Client instantiation\n```\nfrom mailrelay.client import Client as Client\nclient = Client((api_key=api_key, url=url))\n```\n\n### Mailrelay Workflow\n#### Get Groups\n```\nresponse = client.get_groups()\nReturns:\n        list: [\n        {\n            \"id\": 1,\n            \"name\": \"grupo test 1\",\n            \"description\": \"\",\n            \"subscribers_count\": 3,\n            \"created_at\": \"2022-05-11T22:48:18.000Z\",\n            \"updated_at\": \"2022-05-11T22:48:18.000Z\",\n        },\n        {\n            \"id\": 2,\n            \"name\": \"grupo 2\",\n            \"description\": \"\",\n            \"subscribers_count\": 1,\n            \"created_at\": \"2022-05-20T15:38:13.000Z\",\n            \"updated_at\": \"2022-05-20T15:38:13.000Z\",\n        },\n    ]\n```\n\n#### Get Campaigns\n```\nresponse = client.get_campaigns()\n\n Returns:\n        [\n            {\n                \"id\": 0,\n                \"subject\": \"string\",\n                \"sender_id\": 0,\n                \"campaign_folder_id\": 0,\n                \"target\": \"groups\",\n                \"segment_id\": 0,\n                \"group_ids\": \"string\",\n                \"preview_text\": \"string\",\n                \"html\": \"string\",\n                \"editor_type\": \"html\",\n                \"url_token\": false,\n                \"analytics_utm_campaign\": \"string\",\n                \"use_premailer\": false\n            }\n        ]\n\n\n```\n\n#### Send Campaigns\n```\nresponse = client.send_campaigns(id, data)\n```\n\n#### Get Subscribers\n```\nresponse = client.get_subscribers()\n\nReturns:\n            list:\n            [\n                {\n                    \"id\": 1,\n                    \"email\": \"juantest@gmail.com\",\n                    \"name\": \"juan\",\n                    \"score\": None,\n                    \"status\": \"active\",\n                    \"subscribed_at\": None,\n                    \"subscribed_with_acceptance\": False,\n                    \"subscribe_ip\": None,\n                    \"unsubscribed\": False,\n                    \"unsubscribed_at\": None,\n                    \"unsubscribe_ip\": None,\n                    \"unsubscribe_sent_email_id\": None,\n                    \"address\": \"\",\n                    \"city\": \"\",\n                    \"state\": \"\",\n                    \"country\": \"\",\n                    \"birthday\": None,\n                    \"website\": \"\",\n                    \"time_zone\": \"\",\n                    \"locale\": \"\",\n                    \"bounced\": False,\n                    \"reported_spam\": False,\n                    \"local_ban\": False,\n                    \"global_ban\": False,\n                    \"created_at\": \"2022-05-11T22:15:02.000Z\",\n                    \"updated_at\": \"2022-05-11T22:15:02.000Z\",\n                    \"custom_fields\": {},\n                },\n            ]\n```\n\n#### Get Subscriber by id\n```\nresponse = client.get_subscriber_by_id(id)\n\nReturns:\n            dict: {\n                \"id\": 0,\n                \"email\": \"user@example.com\",\n                \"name\": \"string\",\n                \"score\": 0,\n                \"status\": \"string\",\n                \"subscribed_at\": \"1970-01-01T00:00:00.000Z\",\n                \"subscribed_with_acceptance\": false,\n                \"subscribe_ip\": \"198.51.100.42\",\n                \"unsubscribed\": false,\n                \"unsubscribed_at\": \"1970-01-01T00:00:00.000Z\",\n                \"unsubscribe_ip\": \"198.51.100.42\",\n                \"unsubscribe_sent_email_id\": 0,\n                \"address\": \"string\",\n                \"city\": \"string\",\n                \"state\": \"string\",\n                \"country\": \"string\",\n                \"birthday\": \"1970-01-01\",\n                \"website\": \"string\",\n                \"time_zone\": \"Africa/Abidjan\",\n                \"locale\": \"en\",\n                \"bounced\": false,\n                \"reported_spam\": false,\n                \"local_ban\": false,\n                \"global_ban\": false,\n                \"created_at\": \"1970-01-01T00:00:00.000Z\",\n                \"updated_at\": \"1970-01-01T00:00:00.000Z\",\n                \"groups\": [\n                    {\n                    \"group_id\": 0,\n                    \"assigned_at\": \"1970-01-01T00:00:00.000Z\"\n                    }\n                ],\n                \"custom_fields\": {}\n                }\n```\n\n#### Create Subscriber\n```\nresponse = client.create_subscriber(data)\n```\n#### Delete Subscriber\n```\nresponse = client.delete_subscriber(id)\n```\n\n## Requirements\n- requests\n\n## Contributing\nWe are always grateful for any kind of contribution including but not limited to bug reports, code enhancements, bug fixes, and even functionality suggestions.\n\n#### You can report any bug you find or suggest new functionality with a new [issue](https://github.com/GearPlug/mailrelay-python/issues).\n\n#### If you want to add yourself some functionality to the wrapper:\n1. Fork it ( https://github.com/GearPlug/mailrelay-python )\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Adds my new feature')   \n4. Push to the branch (git push origin my-new-feature)\n5. Create a new Pull Request","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgearplug%2Fmailrelay-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgearplug%2Fmailrelay-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgearplug%2Fmailrelay-python/lists"}