The official Python client library for the Yonoma Email Marketing API.
pip install yonoma
or manually install from GitHub:
pip install git+https://github.com/YonomaHQ/yonoma-python
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)
response = yonoma.lists.create('list_name':'New group')
print(response)
response = yonoma.lists.list()
print(response)
response = yonoma.lists.retrieve("list_id")
print(response)
response = yonoma.lists.update('list_id', {'list_name': 'Upadated list name'})
print(response)
response = yonoma.lists.delete('list_id')
print(response)
response = yonoma.tags.create({'tag_name': 'New tag'})
print(response)
response = yonoma.tags.list()
print(response)
response = yonoma.tags.retrieve('tag_id')
print(response)
response = yonoma.tags.update('tag_id', {'tag_name': 'Updated Tag Name'})
print(response)
response = Tags.delete('tag_id')
print(response)
response = yonoma.contacts.create("list_id",
{
email: "email@example.com",
status: "Subscribed" | "Unsubscribed",
firstName: string, //optional
lastName: string, //optional
phone: string, //optional
gender: string, //optional
address: string, //optional
city: string, //optional
state: string, //optional
country: string, //optional
zipcode: string //optional
}
)
print(response)
response = yonoma.contacts.update('list_id','contact_id',{
'status': "Subscribed" | "Unsubscribed"
}
)
print(response)
response = yonoma.contacts.addtag('contact_id', {
'tag_id': 'Tag id'
})
print(response)
response = yonoma.contacts.removetag('contact_id', {
'tag_id': 'Tag id'
})
print(response)
- PyPI Package: Yonoma on PyPI
- GitHub Repository: Yonoma GitHub
- Yonoma API Docs: Yonoma API Documentation
This package is licensed under the MIT License.
This is the official Python SDK for Yonoma Email Marketing, providing seamless API integrations.