Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

No description.

Project description

maida

自己写的一些库,目前只有一个发送邮件的功能。


安装

可以直接 pip 安装

pip install maida

mail

EmailSender

基于 smtplib 的发送邮件脚本

  1. 可以发送文本
  2. 可以发送图片
  3. 可以发送附件(图片、文件等),附件文件名可以包含中文
  4. 可以群发邮件

demo

email = EmailSender(email_host='smtp.qq.com', email_pass='xxx')
content = '这是lzc发送过来的邮件。请注意查收!'
email.init(from_addr='xxx@qq.com', to_addrs=['xxx@qq.com'], subject='测-试')
email.attach_text(text=content)
email.attach_file(r'C:\xxx\xx.jpg')
email.attach_file(r'C:\xxx\xx.txt')
email.send()
email.close()

scrapy

整合了 scrapy_mail 中的拓展,详情请到原始页面查看
scrapy 使用此拓展时可以直接引用,不用手动复制至 scrapy 同级目录

EXTENSIONS = {
    'lzc.extensions.closespider.CloseSpider': 200,
}

变更为

EXTENSIONS = {
    'maida.scrapy.extensions.closespider.CloseSpider': 200,
}

其他地方保持不变

版本历程

详见 history.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for maida, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size maida-0.1.1-py3-none-any.whl (7.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size maida-0.1.1.tar.gz (5.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page