Skip to main content

Yet another Mailup Python client

Project description

💌 Yet another MailUp Python client

Latest Version codecov Build Status License: MIT

Install

pip install mailupy

How to use

Import Mailupy and instantiate the client

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…

for field in client.get_fields():
    print (field)
for group in client.get_groups_from_list(1):
    print (group)

Getting recipients from lists using Ordering and Filtering (Mailup Documentation)

for group in client.get_groups_from_list(
        1, filter_by='Name.Contains(\'Farm\')',
        order_by=['Name asc', 'idGroup desc']):
    print (group)
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

client.get_subscribed_recipient_from_list(1, 'andrea.stagi@lotrek.it')

Subscribe/Unsubscribe recipient to/from lists

recipient_id = client.subscribe_to_list(1, 'Andrea Stagi', 'stagi.andrea@gmail.com')

client.unsubscribe_from_list(1, recipient_id)

Run tests

pip install -r requirements-dev.txt
make test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mailupy-1.0.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

mailupy-1.0.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file mailupy-1.0.0.tar.gz.

File metadata

  • Download URL: mailupy-1.0.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/18.2 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.0

File hashes

Hashes for mailupy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 30c8fa0842b8fd699142c595660c0197a24b52f748ec8fa5ff4ff58376b2cf81
MD5 5aab9f13cc9d06f7db53e47a471ec669
BLAKE2b-256 2dc2f0de0ae393a55d6c374936b233dc29e1c5a75ee88241422bbe37f41c13db

See more details on using hashes here.

File details

Details for the file mailupy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: mailupy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/18.2 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.0

File hashes

Hashes for mailupy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 868e71467ec5a5d154bb0f186c71b2bf9f9adebb9f7dcdb047d02d9a53d054f3
MD5 23386eb4223048b62e407dad380e73d4
BLAKE2b-256 a1d778cba1ba8522c0393c34929f2667284821c8766662bdd43afb9e37d52b19

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page