postgresql范围类型支持canonical的storm orm using pans
StormSpans的Python项目详细描述
暴雨跨度
Stormspans支持PostgreSQL range types 使用规范的Storm ORMPsycoSpans与 Spans。
此包的功能可能与 storm-legacy在未来。
安装
Py> Pycopsas存在于PyPI。pip install psycospans
文件
要获得完整的输出,请从shell运行pydoc stormspans。
示例
fromspansimportintrangefromstorm.localsimport*fromstormspansimportIntRangeclassModel(Storm):id=Int(primary=True)span=IntRange(default=intrange(1,10))def__init__(self,span):self.span=span# NOTE: URI must start with postgres+spans://store=Store(create_database("postgres+spans://<url>"))store.execute(""" CREATE TABLE int_range_test( id SERIAL, span int4range ) """)store.add(Model(intrange(1,100))store.commit()
更改日志
版本1.0.0
于2018年10月9日发布
- 添加了对storm-legacy 的支持
- 增加了对Python3.4和更高版本的支持。注意这只适用于 storm-legacy,因为Storm与Python3不兼容
版本0.1.0
2014年6月12日发布
- 初始提交