Skip to main content

A Python client for the Yonoma API

Project description

Yonoma Email Marketing Python SDK

The official Python client library for the Yonoma Email Marketing API.


Installation**

Install via pip:

pip install yonoma

or manually install from GitHub:

pip install git+https://github.com/YonomaHQ/yonoma-email-marketing-python

Quick Start

Note: This SDK requires Python 3.7 or above.

from yonoma import Yonoma

# Initialize the client
yonoma = Yonoma(api_key="YOUR-API-KEY")
response = yonoma.email.send(
    {'from_email': 'updates@yonoma.io',
     'to_email': 'email@yourdomain.com',
     'subject':"Welcome to Yonoma - You're In!",
     'mail_template': "We're excited to welcome you to Yonoma! Your successful signup marks the beginning of what we hope will be an exceptional journey."
    })
print(response)

Features

Lists

Create a new lists

response = yonoma.lists.create('list_name':'List Name')
print(response)

Get a list of Lists

response = yonoma.lists.list_all()
print(response)

Retrieve a specific lists

response = yonoma.lists.retrieve("list_id")
print(response)

Update a lists

response = yonoma.lists.update('list_id', {'list_name': 'Upadate lists'})
print(response)

Delete a lists

response = yonoma.lists.delete('list_id')
print(response)

Tags

Create a new tag

response = yonoma.tags.create({'tag_name': 'Tag Name'})
print(response)

Get a list of tags

response = yonoma.tags.list_all()
print(response)

Retrieve a specific tag

response = yonoma.tags.retrieve('tag_id')
print(response)

Update a tag

response = yonoma.tags.update('tag_id', 'tag_name': 'Updated Tag Name')
print(response)

Delete a tag

response = Tags.delete('tag_id')
print(response)

Contacts

Create a new contact

response = yonoma.contacts.create(
    "list_id",
    {
        "email":"email@example.com",
        "status":"Subscribed",  # or "Unsubscribed"
        data={
            'firstName': 'Contact',
            'lastName': 'One',
            'phone': '1234567890',
            'address': '123, NY street',
            'city': 'NY City',
            'state': 'NY',
            'country': 'US',
            'zipcode': '10001'
        }
    }
)
print(response)

Update a contact

response = yonoma.contacts.update(
    'list_id',
    'contact_id',
    {
        'status': 'Subscribed'  # or "Unsubscribed"
    }
)
print(response)

Add a tag to a contact

response = yonoma.contacts.add_tag('contact_id', 'tag_id')
print(response)

Remove a tag from a contact

response = yonoma.contacts.remove_tag('contact_id', 'tag_id')
print(response)

Useful Links


License

This package is licensed under the MIT License.


This is the official Python SDK for Yonoma Email Marketing, providing seamless API integrations.

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

yonoma-0.1.9.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yonoma-0.1.9-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file yonoma-0.1.9.tar.gz.

File metadata

  • Download URL: yonoma-0.1.9.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for yonoma-0.1.9.tar.gz
Algorithm Hash digest
SHA256 40303d661cb17db681fa9e6b0153b98a489e03246e13c11d593b9e0561d93a56
MD5 11478ea0449f43762f7a0e7bd2dc0965
BLAKE2b-256 3724c010a507f7973fe866ce5719b8ef65f67a6a729101af375ed849d4c86a27

See more details on using hashes here.

File details

Details for the file yonoma-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: yonoma-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for yonoma-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 278a1a42ddbb0c71b9246f20dbd619102ffa685f69600143c78afaf97bac4b35
MD5 d1447f9b47d1aeb2e6fa1af2d038bee5
BLAKE2b-256 b1f77526329698decf0f211fa7a3953fd434f3436635820478e03608005e466d

See more details on using hashes here.

Supported by

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