Skip to main content

文件/目录相关utils

Project description

tangUtils

996.icu

Description

根据个人使用习惯, 将一些 文件、目录、命令行交互 相关操作做了一个语法糖

Installation

> pip install tangUtils

Examples

from tangUtils.main import Dir
from tangUtils.mail import Mail

em = Mail(fromAddr=("王小明", "10086@qq.com"), password="your auth code")

files = Dir("/path/to/dir").files
toAddr = [
  "10000@qq.com",
  ("王钢蛋", "10010@qq.com"),
]
subject = "来自王小明的提醒"
fallbackText="您的客户端无法显示此类型的消息(html), 请换用其它客户端以查看该超文本内容"
html="""
  <!DOCTYPE html>
  <html lang="zh-cn">
  <body>
    <div>您已接收到来自<strong>王小明</strong>的提示</div>
    <!-- 邮箱客户端一般会屏蔽不同域的图片链接, 可以将图片放到附件中 -->
    <!-- src 使用 cid:idx, idx 是图片所在的文件序号 -->
    <img src="cid:1" alt="picture">
  </body>
  </html>
"""

em.sendTo(toAddr=toAddr, subject=subject, fallbackText=fallbackText, html=html, attachment=files)

em.quit()

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

tangUtils-0.1.3.tar.gz (10.3 kB view details)

Uploaded Source

File details

Details for the file tangUtils-0.1.3.tar.gz.

File metadata

  • Download URL: tangUtils-0.1.3.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.6.8

File hashes

Hashes for tangUtils-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d0525ad9ec7510f249d01a1d17a10c79883c37512fc00e7aeab87a2e8f79983d
MD5 eeda767d7e7e47e662f285e1cc13e2ae
BLAKE2b-256 554bb52876fd917e59d46e9e4140af3c6835d445c5daf4941cbe43ac9a866d69

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page