第三方时间日期库 Python Arrow模块
在玩蛇网前面的文章中,我们介绍过时间的模块,一个是datatime,还有一个就是time模块,今天给大家推荐一个非常轻量级别的时间日期模块,它叫做Arrow。
这个Arrow模块也算的上一个非常标准的时间和日期的第3方库了,提供了一种合理、智能的方式来创建、操作、格式化、转换时间日期的格式,据说它的设计灵感主要来源于moment.js。
为何要有Arrow?
Python标准库和一些其它模块都提供了这些功能和函数方法,为什么还有这个Arrow模块,我们使用其它日期时间模块,经常应用功能过于强大,方法太复杂,不能高效的应用到工作中,而Arrow解决了这些问题。
模块太多:日期、时间、日历、datetuil、pytz等等。
时区和时间戳格式转换起来非常麻烦,还要计算转换。
时区是显式的,比较容易理解。
方法差距:ISO-8601解析、时间跨度、不够人性化等。
Arrow主要功能:
1、时区转换
2、简单的时间戳操作
3、时间跨度
4、非常人性化,支持越来越多的语言环境
5、实现datetime接口
6、支持Python 2.6、2.7和3.3
7、默认采用TZ-aware和UTC
8、创建简洁、智能的接口
9、可以轻松更换和改变属性
10、丰富的解析和格式化选项
11、可扩展的工厂架构来支持自定义Arrow派生类型
Arrow安装方法
进入我们的终端,输入:$ pip install arrow
Arrow官方网站:http://crsmithdev.com/arrow/
GitHub托管的地址:https://github.com/crsmithdev/arrow
以上就是Arrow时间日期这个轻量级模块库的介绍了,有什么不明白,大家可以留言,或者加入玩蛇网QQ群。
玩蛇网文章,转载请注明出处和文章网址:https://www.iplaypy.com/module/m111.html
相关文章 Recommend
- • Python UTC时区时间转换
- • python运行爬虫程序时间如何控制?
- • 为什么python输出数据时间比C++长
- • 请问SAE用第三方提示:ImportError: No module named feed
- • BAE,SAE一类平台哪些能支持安装python第三方C扩展的
- • 贴个python源码求分析,微信第三方接口无法为客户
- • 请问如何使urlretrieve运行一段时间后退出
- • python爬虫运行一段时间后,返回403 forbidden原因是什
- • 用python方法判断查找文件修改时间的方法
- • android获得农历时间python有什么开源库或者包吗
- • Python控制登录时间有效性的方法要如何写?
- • python哪个第三方库支持URL为参数播放音乐
下一篇:没有了
PYTHON基础入门必备教程 Must Know PYTHON Tutorials
- • python 解释器
- • python idle
- • python dir函数
- • python 数据类型
- • python type函数
- • python 字符串
- • python 整型数字
- • python 列表
- • python 元组
- • python 字典
- • python 集合
- • python 变量
- • python print
- • python 函数
- • python 类定义
- • python import
- • python help
- • python open
- • python 异常处理
- • python 注释
- • python continue
- • python pass
- • python return
- • python global
- • python assert
- • python if语句
- • python break
- • python for循环
- • python while循环
- • python else/elif
- • lambda匿名函数
PYTHON进阶提高必备教程 Must Know PYTHON Modules
- • os 模块
- • sys 模块
- • re 正则表达式
- • time 日期时间
- • pickle 持久化
- • random 随机
- • csv 模块
- • logging 日志
- • socket网络通信
- • json模块
- • urlparse 解析URL
- • urllib 模块
- • urllib2 模块
- • robotparser 解析
- • Cookie 模块
- • smtplib 邮件
- • Base64 编码
- • xmlrpclib客户端
- • string 文本
- • Queue 线程安全
- • math数学计算
- • linecache缓存
- • threading多线程
- • sqlite3数据库
- • gzip压缩解压
最新内容 NEWS
- • Python linecache模块缓存读取大文件指定行
- • Python OS模块常用功能 中文图文详解
- • Python json解析模块loads/dumps中文encode教程
- • Python random模块sample、randint、shuffle、cho
- • Python urllib2模块post/get 下载网络资源
- • Python re正则表达式操作指南
- • Python time模块 函数格式 时间操作源码演示
- • Python Gzip压缩与解压模块
- • 第三方时间日期库 Python Arrow模块
- • Python Queue模块 多线程安全 先进先出的实
图文精华 RECOMMEND
-
Python linecache模块缓存读取大文件
-
Python OS模块常用功能 中文图文详
-
Python json解析模块loads/dumps中文e
-
Python random模块sample、randint、shu
-
Python re正则表达式操作指南
-
Python time模块 函数格式 时间操作
热点文章 HOT
- Python json解析模块loads/dumps中文encode教程
- Python re正则表达式操作指南
- Python threading多线程模块
- Python string模块 字符串函数方法操作教程
- Python robotparser 网络蜘蛛robots.txt搜索访问
- Python Cookie HTTP获取cookie并处理
- Python urllib模块 网络资源访问安装下载
- Python csv模块读写中文乱码等问题解决
- Python urllib2模块post/get 下载网络资源
- Python sys模块 argv path常用方法图文详解