{"id":19640200,"url":"https://github.com/gearplug/mailerlite-python","last_synced_at":"2025-02-26T22:44:31.127Z","repository":{"id":65017344,"uuid":"575504637","full_name":"GearPlug/mailerlite-python","owner":"GearPlug","description":"mailerlite-python is an API wrapper for MailerLite, written in Python","archived":false,"fork":false,"pushed_at":"2023-03-28T15:06:06.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-09T18:56:05.700Z","etag":null,"topics":["api","groups","mailer","mailerlite","notifications","python","requests","subscribers","webhook","wrapper"],"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/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-12-07T16:57:44.000Z","updated_at":"2023-10-06T17:21:42.000Z","dependencies_parsed_at":"2025-01-10T10:53:12.525Z","dependency_job_id":null,"html_url":"https://github.com/GearPlug/mailerlite-python","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.07692307692307687,"last_synced_commit":"17d7f4f7fceb3f130a77d4c01779b75cc20d7f49"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GearPlug%2Fmailerlite-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GearPlug%2Fmailerlite-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GearPlug%2Fmailerlite-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GearPlug%2Fmailerlite-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GearPlug","download_url":"https://codeload.github.com/GearPlug/mailerlite-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240947651,"owners_count":19883030,"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":["api","groups","mailer","mailerlite","notifications","python","requests","subscribers","webhook","wrapper"],"created_at":"2024-11-11T14:05:00.681Z","updated_at":"2025-02-26T22:44:31.100Z","avatar_url":"https://github.com/GearPlug.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://img.shields.io/badge/version-0.1.1-success) ![](https://img.shields.io/badge/code-Python-4B8BBE?logo=python\u0026logoColor=white)\n# mailerlite-python\n\nmailerlite-python is an API wrapper for MailerLite, written in Python\n\n## Installing\n```\npip install mailerlite-python\n```\n## Usage\n```\nfrom mailerlite.client import Client\nclient = Client('API_KEY')\n```\n### Subscribers\n#### List Subscribers\n```\nsubs = client.list_subscribers(params=None)\n# Optional params (dict):\n# filter[status] = Must be one of the possible statuses: active, unsubscribed, unconfirmed, bounced or junk.\n# limit = Defaults to 25\n# page = Defaults to 1\n```\n#### Create Subscriber\n```\nsubscriber = {\n    \"email\": \"carlos@burgos.com\",\n    \"fields\": {\n        \"name\": \"Carlos\",\n        \"last_name\": \"Burgos\",\n        \"city\": \"Bogotá\",\n    }\n}\nsub = client.create_subscriber(subscriber)\n# If user email already exists, updates existing subscriber.\n```\n#### Fetch Subscriber\n```\n# Reference can be either email or ID\nsubscriber = client.fetch_subscriber(reference)\n```\n#### Delete Subscriber\n```\nclient.delete_subscriber(subscriber_id)\n```\n#### Subscribe Subscriber\n```\nclient.activate_subscriber(subscriber_id)\n```\n#### Unsubscribe Subscriber\n```\nclient.unsubscribe_subscriber(subscriber_id)\n```\n#### Assign Subscriber to a Group\n```\nclient.assign_to_group(subscriber_id, group_id)\n```\n#### List Subscriber fields\n```\nfields = client.list_subscriber_fields()\n```\n#### List Groups\n```\ngroups = client.list_groups(params=None)\n# Optional params (dict):\n# filter[name] = Returns partial matches\n# limit = An account can have at most a 250 groups\n# page = Defaults to 1\n# sort = Can be one of: name, total, open_rate, click_rate, created_at. Defaults to ascending order; prepend (-)\n```\n\n### Webhooks\n#### List all webhooks\n```\nwebhooks = client.list_webhooks()\n```\n#### Create webhook\n```\nwebhook = {\n    \"name\": \"first webhook\",\n    \"events\": [\"subscriber.created\"],\n    \"url\": \"http://www.cartwright.info/eligendi-soluta-corporis-in-quod-ullam\"\n}\nwebhook_created = client.create_webhook(webhook)\n```\n#### Delete webhook\n```\nclient.delete_webhook(webhook_id)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgearplug%2Fmailerlite-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgearplug%2Fmailerlite-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgearplug%2Fmailerlite-python/lists"}