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.

Source Distribution

cwstoolkit-1.0.3.tar.gz (9.1 kB view details)

Uploaded Source

File details

Details for the file cwstoolkit-1.0.3.tar.gz.

File metadata

  • Download URL: cwstoolkit-1.0.3.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for cwstoolkit-1.0.3.tar.gz
Algorithm Hash digest
SHA256 6b87f99e477f2f225d01ddd71db3a1746bbd865d777da7a97dc721d76006f3d3
MD5 ed3eaca23e9be4f94ea2706901f42d76
BLAKE2b-256 b152d6c27ce23cb25644845af89907cf3ab0f62f0fa89e52d713854a3932ed6e

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