Skip to main content

xtoolkit从新封装了python下常用的数据类型,在内置模块的基础上扩展了部分功能.

Project description

xToolkit是python内置库的一个扩展库.把python的datetime,string,list,dist等数据结构重新进行了封装,扩展了部分功能.

  • 适用对象:python工程师
  • 作者:熊利宏
  • 邮箱:xionglihong@163.com 有任何意见欢迎发送邮件,我们一起打造一个好用的python内置库的扩展库
什么是xToolkit库?

库xToolkit的中文名字叫X工具集.是python内置库的一个扩展库.把python的datetime,string,list,dist等数据结构重新进行了封装,扩展了部分功能.

操作文档

https://www.showdoc.cc/xToolkit?page_id=2133295307421808

实例:
导入xToolkit库
from xToolkit import xstring, xdatetime
判断时间格式时分正确
# 判断时间格式"1988-07-20"是否合规
xdatetime.shape("1988-07-20")
>>True
# 判断时间格式"1988-07-88"是否合规
xdatetime.shape("1988-07-88")
>>False
# 判断时间格式"98787987"是否合规
xdatetime.shape("98787987")
>>True
时间模块的get方法
# 获取当前时间
xdatetime.get().format()
>>2020-03-30 20:52:10
# 输出当前iso时间
xdatetime.get()
>>2020-03-30T20:55:09.125681+08:00
# 时间戳转时间格式
xdatetime.get(1584689499).format()
>>2020-03-20 15:31:39
# 时间字符串转时间
xdatetime.get("2020-03-20T22:09:06.252525+0800").format()
>>2020-03-20 22:09:06

更多实例请参照参考文档 https://www.showdoc.cc/xToolkit?page_id=2133295307421808

更新说明:

2019年05年10日 V0.0.10

  • 上线并新增获取当前时间功能

2019年05年16日 V0.0.12

  • 新增格式化时间format功能,更人性化的输出时间格式
  • 新增推移时间功能
  • 新增替换时间功能
  • 新增判断时间格式是否正确功能
  • 新增获取时间区间功能

2019年06月11日 V0.0.21

  • 新增字符串效验功能

2019年08月20日 v0.0.25

  • 新增中国居民身份证效验功能
  • 新增中国大陆手机号码效验功能
  • 新增数字效验功能
  • 新增身份证验证输出性别

2019年09月02日 v0.0.30

  • 新增浮点数,银行卡效验

2020年05月28日 v0.0.43

  • 新增字符串 split多分割标识

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

xToolkit-0.0.44.tar.gz (12.2 kB view hashes)

Uploaded Source

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