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.1.tar.gz (2.6 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.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: unimail_py_sdk-0.0.1.tar.gz
  • Upload date:
  • Size: 2.6 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.1.tar.gz
Algorithm Hash digest
SHA256 38b4875f1e7ee6616a78c622920dd0ee832f505f81ab8c46ef722f9e0fb41449
MD5 e3cd729814f62dc61ffa02253372b97c
BLAKE2b-256 39c35f93de966522ed75f54c59871055e684ec2cdb558b0c3680652617bd0472

See more details on using hashes here.

File details

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

File metadata

  • Download URL: unimail_py_sdk-0.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f7a001d5d61516530fe2f40cf441ee5d1acb8bdef6461bea96b8fc3a3fc5573a
MD5 14958d66cb3a8f3be5d6a4f31a0d768b
BLAKE2b-256 b3416cf758801ac6c38055f506df35a1ff7d47c98e7d4757544d5916abd31343

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