Skip to main content

colinspace smart-devops toolkits

Project description



# v-0.0.9

修改 sms 和 email 模板 同时支持 python2 和 python3


# v-0.0.10

修改钉钉模板,支持Markdown 消息类型

# v-0.0.11

dingding 模块中 关于python2 和Python3支持 configparser 的问题

# v-0.0.12

邮件发送附件支持各类压缩格式


# v1.0.0

修改短信、钉钉、邮件发送结果为 json 格式

# v1.0.2

添加七牛上传功能,
默认一般文件上传之后存放在
files/20190213/xxxx.txt
图片/js/css 上传之后存放在 (images/js/css)
static/images/20190213/xxxx

首先需要自定义配置文件:

cat xx.conf
[bucketname]
bucket_name = bucketname
access_key = xxxxx
secret_key = xxxx

Demo:

from cwstools.Qiniu import qiniuInstance

demo = qiniuInstance()
demo.configfile = xx.conf
demo.section = bucketname
demo.local_filename = real_local_file.txt
demo.filetype = "file"
demo.upload_file()

# v1.0.3

把 之前定义的 colinws 中的基础包和函数归纳到当前包中来

utilsBase

colorMsg(color, msg)
getMD5(object)
generate_passwd(passwd_length=16)
getIPAdress(ifname='eth0')
getIPAdress2()

utilsLog

printLog(string)
warnLog(string)
errorLog(string)

utilsDate

today(mode=1)
yesterday(mode=1)
tommorrow(mode=1)
diffDay(differ=1, mode=1)
daytime(mode=1)
firstAndLastDay(mode=1)
curHour(mode=1)
diffHour(differ=1, mode=1)

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 cwstoolkit, version 1.0.3
Filename, size File type Python version Upload date Hashes
Filename, size cwstoolkit-1.0.3.tar.gz (9.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page