Skip to main content

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

Project description

unimal-py-sdk

The current SDK version is v2. If you need to use the previous v1 version, please switch to the v1 branch.

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

github 中文文档

usage

  • pip install
pip install unimail-py-sdk
  • init a unimail client

you need a authorization key.

main.py

from unimail_py_sdk import UnimailReq, Client, Result

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

client: Client = Client(key)

result = client.check_connect()
print(result)
  • send email
    req = UnimailReq(
        # from_name= "",
        receivers=["email"],
        # cc=["email"],
        # bcc=["email"],
        subject="test",
        html_content="test",
    )
    req.append_file("att1.txt", path = "tests/attachment.txt")
    result: Result = client.send_email(req)
    for key, val in result.__dict__.items():
        print(f"{key}: {val}")

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(req :UnimailReq) -> Result

please see usage

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.

  • tips

If you want to use this SDK, please contact the author via admin@allcloud.top.

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-1.0.0.tar.gz (4.5 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-1.0.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: unimail_py_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for unimail_py_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4ff7e76b13fd21820c503c4a3c3031fd8a41c9d6f8d091bb7aec6653683f9a19
MD5 bde8008dfeaf457000a49958dea683d6
BLAKE2b-256 c3331483b87db8315630e332fc1c5c3e2e87e6cbc06d8cbf2ff33a73a10fc384

See more details on using hashes here.

File details

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

File metadata

  • Download URL: unimail_py_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for unimail_py_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1532ceffe69dfe6f2a6a8ba83d05cbde3195c4576b9561ba53383628678035a0
MD5 19926de91dd342921f4d64fc835f8efb
BLAKE2b-256 22b172c98ffaa3e6f4bb070cc1f8115d4b22ee7ac3fed82f88f51e1b25d83e03

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