Skip to main content

This is a Python SDK for Unimail. Quickly integrate into your project

Project description

unimal-py-sdk

This is a Python SDK for Unimail. Quickly integrate into your project

中文文档

simple usage

  • init a unimail client

you need a authorization key.

main.py

from unimail-py-sdk import Client, Result

# please input your key here
key: str = ""

client: Client = Client(key)

client.check_connect()
  • send email

example receiver: aaa@gmail.com
email subject: email subject
email content: this is a email content

    result: Result := client.send_email("aaa@gmail.com", "email subject", "this is a email content")

    if result.is_success:
        print("send email success")
    else:
        print(f"send email fail, error: {result.msg}")
  • batch send email

example receivers: aaa@gmail.com,bbb@gmail.com
email subject: email subject
email content: this is a email content

    result: Result := client.batch_send_email("aaa@gmail.com", "email subject", "this is a email content")

    if result.is_success:
        print("send email success")
    else:
        print(f"send email fail, error: {result.msg}")

api docs

  1. Client(key: str, host: str, data: str, obj: json): Client

init a client by key

  1. client.set_language(language :str) -> bool

set language for the client,default is zh

  1. client.check_connect() -> bool

check the host and key is ok

  1. client.send_email(receiver :str, subject :str, content :str) -> Result

send email to receiver. if you have many receiver, you can concat the receiver by ";" or use BatchSendEmail

  1. client.batch_send_email(receivers :list, subject :str, content :str) -> Result

like SendEmail, but receivers is a slice

support language

chinese is the default language for the sdk.

  • english (en)
  • simple chinese (zh)
  • vietnamese (vi)
  • idonesian (id)
  • thai (th)
  • gujarati (gu)

if you want to support other language, please open a issue.

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

unimail_py_sdk-0.0.2.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

unimail_py_sdk-0.0.2-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file unimail_py_sdk-0.0.2.tar.gz.

File metadata

  • Download URL: unimail_py_sdk-0.0.2.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.7 Windows/11

File hashes

Hashes for unimail_py_sdk-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2f0e62465338acda5b17c771f539f8162875e78426ce60e71570bbd72f735b7a
MD5 e501f34534321dc004b9f3251ed2dc4e
BLAKE2b-256 5c7385e95c0c7e6d1521114d29194fc77d29c6d2366014d829f3bcabe2f58183

See more details on using hashes here.

File details

Details for the file unimail_py_sdk-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: unimail_py_sdk-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.7 Windows/11

File hashes

Hashes for unimail_py_sdk-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 09ae320450ab32f7867df4f1b11ad772fdc8ebc925ed9b7b8a8bb67a3488cebd
MD5 bc91ad24c3acaec3c04092c79465a236
BLAKE2b-256 8b138fde7dc4530e02f7212e6d4bebef747810c27bc00e93a900c99658c0de98

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