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-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")

Send your email

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 list

response = yonoma.lists.create('list_name':'New group')
print(response)

Get a list of Lists

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

Retrieve a specific list

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

Update a list

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

Delete a list

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

Tags

Create a new tag

response = yonoma.tags.create({'tag_name': 'New tag'})
print(response)

Get a list of tags

response = yonoma.tags.list()
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" | "Unsubscribed",
        data: {
            firstName: string,
            lastName: string,
            phone: string,
            gender: string,
            address: string,
            city: string,
            state: string,
            country: string,
            zipcode: string,
        }
    }
)
print(response)

Update a contact

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

Add a tag to a contact

response = yonoma.contacts.addtag('contact_id', {
    'tag_id': 'Tag id'
})
print(response)

Remove a tag from a contact

response = yonoma.contacts.removetag('contact_id', {
    'tag_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-1.2.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

yonoma-1.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for yonoma-1.2.tar.gz
Algorithm Hash digest
SHA256 456050c574f8924f73fb8557dd2fcb0629b5ab29b48ea404f88cfb0fb7abfc09
MD5 80305c4fe22a4f0c3b355128de37f540
BLAKE2b-256 51c3a6f383f288ee796c43657b54c2e0f0262f4c5230915350005946615f9293

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for yonoma-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c8101b2eda72876d127a91aba2e7c5ca8b564b88424a6441d4d397935da03e90
MD5 6cceef227a826887fc930029ce060715
BLAKE2b-256 0f2d58ec91a1c4e7caac401b61980572ab469c1883dd1a47259532c9423b643c

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