Skip to main content

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.

Metadata

Release files for yonoma 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yonoma 1.2
File Size Uploaded
yonoma-1.2.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yonoma 1.2
File Interpreter ABI Platform
yonoma-1.2-py3-none-any.whl Python 3 none any Details

Total release size: 10.0 kB

Release files / yonoma-1.2.tar.gz

Download URL yonoma-1.2.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
456050c574f8924f73fb8557dd2fcb0629b5ab29b48ea404f88cfb0fb7abfc09
BLAKE2b-256 checksum
How to use checksums
51c3a6f383f288ee796c43657b54c2e0f0262f4c5230915350005946615f9293
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / yonoma-1.2-py3-none-any.whl

Download URL yonoma-1.2-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8101b2eda72876d127a91aba2e7c5ca8b564b88424a6441d4d397935da03e90
BLAKE2b-256 checksum
How to use checksums
0f2d58ec91a1c4e7caac401b61980572ab469c1883dd1a47259532c9423b643c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

1.2 This release

2 release files

1.1

2 release files

0.1.9

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page