A python library for EmailJS API
Project description
jodev_emailpy
A Python package that helps you send and recieve email directly using emailjs restful service
Getting Started
To install into your python environment use
pip install jodev_emailpy
On successfull installation , you are ready to start using jodev_emailpy to start recieving and sending email directly from your client side application no backend server needed
Useage
To send a message to your configured email
from jodev_emailpy import EmailPy
PUBLIC_KEY :str = "YOUR-PUBLIC-KEY-FROM-EMAILJS"
SERVICE_ID : str = "YOUR-SERVICE-ID-FROM-EMAILJS"
TEMPLATE_ID :str = "YOUR-TEMPLATE-ID-FROM-EMAILJS"
TEMPLATE_PARAMS : dict = {
# customize to fit as per your template variables requirement e.g
"email_id" : "jodek@gmail.com",
"message": "hello test mssg"
}
# input your public_key to initialize the client
client = EmailPy(PUBLIC_KEY)
client.send(service_id=SERVICE_ID, template_id=TEMPLATE_ID,
template_params=TEMPLATE_PARAMS)
To retrieve a list of email history
ACCESS_TOKEN = "YOUR-ACCESS-TOKEN-SECRET-KEY"
response = client.get_history(access_token=ACCESS_TOKEN)
Other optional arguments to pass to get_history method are :
- count : int #this is the count of email history to retrieve
- page : int default is 1 . this helps for pagination
note access token can then be omitted for successive call of get_history()
if response status is 200 without error you should be able to retrieve email history
print(response.json()['rows'])
ensure you have signed up on emailjs website so as to have access to credentials needed. if not, here is their website link to sign up https://dashboard.emailjs.com/sign-up
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 jodev_emailpy-0.1.0.tar.gz.
File metadata
- Download URL: jodev_emailpy-0.1.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8245d20b6ebc26fa7873262b753221db42d8bfacec4e31f8bda73b4044b179c2
|
|
| MD5 |
652aa5fdde957fba29b0c0e696479f02
|
|
| BLAKE2b-256 |
21b7ab20b5c21c5097f8ab908abc9af0579f4431b2a1fea11114b0ac2f957cb4
|
File details
Details for the file jodev_emailpy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jodev_emailpy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
beef8a90cd59ba586e428ab2d4cd2e221814b12e6428d78bffa2514ee048ba90
|
|
| MD5 |
a70844025d8f01b6ae1dedcdf851f9e0
|
|
| BLAKE2b-256 |
dd8dbae587b9db861b3a05ee1f2e71ec2a50a5a770e1a9665248bafec9820a6f
|