![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
这个作者很懒,什么都没留下…
展开
-
python读取xml文档插入数据库并重命名xml进行判断是否存库
from xml.dom.minidom import parse import xml.etree.ElementTree as ET import re,os,datetime from loguru import logger import pymysql conn = pymysql.connect(host='localhost', user='root', password='',原创 2020-06-19 15:28:00 · 302 阅读 · 0 评论 -
读取excel数据存储到mysql并进行重命名
import pandas as pd import pymysql import os conn = pymysql.connect(host=’…’, user=’…’, password=’…’, db=’…’, charset=‘utf8’) cursor = conn.cursor() def save_excel(): print(‘开始查找Excel文件夹下面文件’) folder_num = os.listdir(r’Excel\’) if folder_num is []: print(‘原创 2020-06-19 15:10:51 · 206 阅读 · 0 评论 -
python调用sendcloud模板发送带附件的邮件
import json import urllib import requests class Email: apiUser = “* " apiKey = " *” send_from = " * * " def send_email(self, send_to, subject, templateInvokeName): xsmtpapi = { ‘to’: “ * * ”, ‘sub’: { ‘%content%’: ‘ * * ’ } } data = { “apiUser”: self.apiUs原创 2020-06-19 15:07:25 · 526 阅读 · 0 评论 -
python 发送邮件(可批量发送)
from email.mime.multipart import MIMEMultipart from email.mime.application import MIMEApplication import smtplib from email.mime.text import MIMEText class mailLog: # 第三方 SMTP 服务 self.mail_host = “smtp.163.com” # SMTP服务器 self.mail_user = " *** " # 用户名 se原创 2020-06-19 15:02:43 · 875 阅读 · 0 评论