Name | mailupy JSON |
Version |
1.1.4
JSON |
| download |
home_page | |
Summary | Yet another Mailup Python client |
upload_time | 2024-03-15 14:47:41 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.6 |
license | MIT |
keywords |
mailup
python
api
client
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
|
coveralls test coverage |
|
# mailupy
💌 Yet another [MailUp](https://www.mailup.it/) Python client
[](https://pypi.python.org/pypi/mailupy/)
[](https://codecov.io/gh/lotrekagency/mailupy)
[](https://travis-ci.org/lotrekagency/mailupy)
[](https://github.com/lotrekagency/mailupy/blob/master/LICENSE)
## Contributing
Any help is welcome, as long as you don't break the continuous integration.
Fork the repository and open a Pull Request directly on the master branch.
A maintainer will review and integrate your changes.
Maintainers:
- [Andrea Stagi](https://github.com/astagi)
- [Edoardo Grassi](https://github.com/edoaxyz)
Contributors:
- [Fabio Piras](https://github.com/Arussil)
## Install
```sh
pip install mailupy
```
## How to use
Import Mailupy and instantiate the client
```py
from mailupy import Mailupy
client = Mailupy(
'm00000',
'm@1lUPf4k3',
'8123dbff-d12c-4e3d-a55e-23a8c5a303f8',
'16cadddf-a145-45db-9347-a5ab51ac223d'
)
```
## Examples
Getting information about fields, groups...
```py
for field in client.get_fields():
print (field)
```
```py
for group in client.get_groups_from_list(1):
print (group)
```
Getting recipients from lists using [Ordering and Filtering (Mailup Documentation)](http://help.mailup.com/display/mailupapi/Paging+and+filtering)
```py
for group in client.get_groups_from_list(
1, filter_by='Name.Contains(\'Farm\')',
order_by=['Name asc', 'idGroup desc']):
print (group)
```
```py
for recipient in client.get_subscribed_recipients_from_list(
1, filter_by='Email.Contains(\'zzz\')',
order_by=['Email desc']):
print (recipient['Email'])
```
Getting a subscribed recipient from a list
```py
client.get_subscribed_recipient_from_list(1, 'andrea.stagi@lotrek.it')
```
Subscribe/Unsubscribe recipient to/from lists
```py
recipient_id = client.subscribe_to_list(
1, 'Andrea Stagi', 'stagi.andrea@gmail.com', pending=False
)
client.unsubscribe_from_list(1, recipient_id)
```
## Run tests
```sh
pip install -r requirements-dev.txt
make test
```
Raw data
{
"_id": null,
"home_page": "",
"name": "mailupy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "mailup,python,api,client",
"author": "",
"author_email": "Lotr\u00e8k <dimmitutto@lotrek.it>",
"download_url": "https://files.pythonhosted.org/packages/1e/a5/d9e3d9ee6b62b794253cd4dfe5017905824d317ee877f1b97c44e7fa14f1/mailupy-1.1.4.tar.gz",
"platform": null,
"description": "# mailupy\n\n\ud83d\udc8c Yet another [MailUp](https://www.mailup.it/) Python client\n\n[](https://pypi.python.org/pypi/mailupy/)\n[](https://codecov.io/gh/lotrekagency/mailupy)\n[](https://travis-ci.org/lotrekagency/mailupy)\n[](https://github.com/lotrekagency/mailupy/blob/master/LICENSE)\n\n## Contributing\n\nAny help is welcome, as long as you don't break the continuous integration.\nFork the repository and open a Pull\u00a0Request directly on the master branch.\nA maintainer will review and integrate your changes.\n\nMaintainers:\n\n- [Andrea Stagi](https://github.com/astagi)\n- [Edoardo Grassi](https://github.com/edoaxyz)\n\nContributors:\n\n- [Fabio Piras](https://github.com/Arussil)\n\n## Install\n\n```sh\npip install mailupy\n```\n\n## How to use\n\nImport Mailupy and instantiate the client\n\n```py\nfrom mailupy import Mailupy\n\nclient = Mailupy(\n 'm00000',\n 'm@1lUPf4k3',\n '8123dbff-d12c-4e3d-a55e-23a8c5a303f8',\n '16cadddf-a145-45db-9347-a5ab51ac223d'\n)\n```\n\n## Examples\n\nGetting information about fields, groups...\n\n```py\nfor field in client.get_fields():\n print (field)\n```\n\n```py\nfor group in client.get_groups_from_list(1):\n print (group)\n```\n\nGetting recipients from lists using [Ordering and Filtering (Mailup Documentation)](http://help.mailup.com/display/mailupapi/Paging+and+filtering)\n\n```py\nfor group in client.get_groups_from_list(\n 1, filter_by='Name.Contains(\\'Farm\\')',\n order_by=['Name asc', 'idGroup desc']):\n print (group)\n```\n\n```py\nfor recipient in client.get_subscribed_recipients_from_list(\n 1, filter_by='Email.Contains(\\'zzz\\')',\n order_by=['Email desc']):\n print (recipient['Email'])\n```\n\nGetting a subscribed recipient from a list\n\n```py\nclient.get_subscribed_recipient_from_list(1, 'andrea.stagi@lotrek.it')\n```\n\nSubscribe/Unsubscribe recipient to/from lists\n\n```py\nrecipient_id = client.subscribe_to_list(\n 1, 'Andrea Stagi', 'stagi.andrea@gmail.com', pending=False\n)\n\nclient.unsubscribe_from_list(1, recipient_id)\n```\n\n## Run tests\n\n```sh\npip install -r requirements-dev.txt\nmake test\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Yet another Mailup Python client",
"version": "1.1.4",
"project_urls": {
"Homepage": "https://github.com/lotrekagency/mailupy"
},
"split_keywords": [
"mailup",
"python",
"api",
"client"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f6a2391f523a54d9cbe701177bb508cf3cf690bd69190f57df2d79c4335e17ea",
"md5": "dcde86320aef1576d59f9ddbdab8f880",
"sha256": "8710dce9ba5ccf8a059a3570f2aa5a51990cdedf445321c1df3ca620bdbeaf85"
},
"downloads": -1,
"filename": "mailupy-1.1.4-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "dcde86320aef1576d59f9ddbdab8f880",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.6",
"size": 9904,
"upload_time": "2024-03-15T14:47:39",
"upload_time_iso_8601": "2024-03-15T14:47:39.984971Z",
"url": "https://files.pythonhosted.org/packages/f6/a2/391f523a54d9cbe701177bb508cf3cf690bd69190f57df2d79c4335e17ea/mailupy-1.1.4-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1ea5d9e3d9ee6b62b794253cd4dfe5017905824d317ee877f1b97c44e7fa14f1",
"md5": "9d94a925877d287d91fc9ba0671cb47c",
"sha256": "d52cb2dcbb977f383a2e05701f3bae46ce4b87a64728e735ba3a5abd370296a8"
},
"downloads": -1,
"filename": "mailupy-1.1.4.tar.gz",
"has_sig": false,
"md5_digest": "9d94a925877d287d91fc9ba0671cb47c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 10341,
"upload_time": "2024-03-15T14:47:41",
"upload_time_iso_8601": "2024-03-15T14:47:41.013600Z",
"url": "https://files.pythonhosted.org/packages/1e/a5/d9e3d9ee6b62b794253cd4dfe5017905824d317ee877f1b97c44e7fa14f1/mailupy-1.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-15 14:47:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lotrekagency",
"github_project": "mailupy",
"travis_ci": true,
"coveralls": true,
"github_actions": true,
"lcname": "mailupy"
}