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")
Features
Lists
Create a new lists
from yonoma.lists import Lists
Lists = Lists(yonoma)
response = Lists.create(list_name="New lists")
print(response)
Get a list of Lists
response = Lists.list_all()
print(response)
Retrieve a specific lists
response = Lists.retrieve(list_id="list_id")
print(response)
Update a lists
response = Lists.update(list_id="A0SADFD6PJ", list_name="Updated lists Name")
print(response)
Delete a lists
response = Lists.delete(list_id="list_id")
print(response)
Tags
Create a new tag
from yonoma.tags import Tags
Tags = Tags(yonoma)
response = Tags.create(tag_name="New Tag")
print(response)
Get a list of tags
response = Tags.list_all()
print(response)
Retrieve a specific tag
response = Tags.retrieve(tag_id="TAG_ID")
print(response)
Update a tag
response = Tags.update(tag_id="TAG_ID", tag_name="Updated Tag Name")
print(response)
Delete a tag
response = Tags.delete(tag_id="TAG_ID")
print(response)
Contacts
Create a new contact
from yonoma.contacts import Contacts
contacts = Contacts(yonoma)
response = contacts.create(
list_id="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 = contacts.update(
list_id="list_id",
contact_id="CONTACT_ID",
status="Subscribed" # or "Unsubscribed"
)
print(response)
Add a tag to a contact
response = contacts.add_tag(contact_id="CONTACT_ID", tag_id="TAG_ID")
print(response)
Remove a tag from a contact
response = contacts.remove_tag(contact_id="CONTACT_ID", tag_id="TAG_ID")
print(response)
Useful Links
- PyPI Package: Yonoma on PyPI
- GitHub Repository: Yonoma GitHub
- Yonoma API Docs: Yonoma API Documentation
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.6.tar.gz
(3.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yonoma-0.1.6.tar.gz.
File metadata
- Download URL: yonoma-0.1.6.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d47b01dfaaf6c5bd5fbfcf655a9bb19b6a9f3701e4ebfd4ab8223f715b805a44
|
|
| MD5 |
6a85cbb3faa1c4a1f7f08983c7166545
|
|
| BLAKE2b-256 |
08a3f7a03c8de7962c5f01ab9f7825f9e7ac9b410a950c99c3384f0d0ea1d56f
|
File details
Details for the file yonoma-0.1.6-py3-none-any.whl.
File metadata
- Download URL: yonoma-0.1.6-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9af912162cb86e8e9ad0a2a510618d06e0acd9b6d225d2de5f1c6431debeab15
|
|
| MD5 |
4cfe4fb4c65a6d7155dc1833f4c93aa0
|
|
| BLAKE2b-256 |
cf58138d2c4b8645d071b5567f51757bcdde7c6764b1e54c526d9a0945f9b8a0
|