python数据抽象层(orm)

DStore的Python项目详细描述


欢迎来到dstore
图片::https://img.shields.io/covertalls/marklark/dstore.svg
:目标:https://covertalls.io/github/marklark/dstore?分支=主

…图片::https://img.shields.io/travis/marklark/dstore/master.svg
:目标:https://travis ci.org/marklark/dstore

…图像::https://img.shields.io/pypi/v/dstore.svg
:目标:https://pypi.python.org/pypi/dstore

…图片::https://img.shields.io/pypi/pyversions/dstore.svg
:目标:https://pypi.python.org/pypi/dstore


从pypi
----
dstore可从pypi存储库获得,网址为'dstore<;https://pypi.python.org/pypi/dstore>;` `.


这意味着您要安装dstore,只需在控制台中运行以下命令:

。代码块::console

$pip install dstore

>;from source
----
dstore也可以通过从github下载并运行setup.py从源代码安装。代码块::console

$wget https://github.com/marklark/dstore/archive/master.tar.gz
$tar xvf master.tar.gz
$cd dstore master
$python setup.py install


requirements
===
dstore不依赖任何其他python包。

以下是python版本:

*2.7
*3.3
*3.4
*3.5
*3.6



>最小示例
==代码块::python


from dstore import memorystore,model,var,mod

class car(model):
u namespace=“cars.make”
u vars=[
var.rowid,
var.string(“manufacturer”,32,mods=[mod.notnull()],
var.string(“make”,32,mods=[mod.notnull()]),
var.number(“year”,mods=[mod.notnull(),mod.min(1950),mod.max(2017)),
]


然后使用filter和all
car(manufacturer=“holden”,make=“commodore”,year=2010).add()
holdens=car.filter(manufacturer=“holden”)
cars=car.all()

http://python dstore.readthedocs.io/>;`

测试结果:`travis ci<;https://travis ci.org/marklark/dstore>;`

测试覆盖范围:`coveralls<;https://coveralls.io/github/marklark/dstore>;。`_

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java字符串数组到字符数组   cmusphinx试图在有人用JAVA说话时让静止图像“说话”   java试图使用密钥侦听器   string如何在java中使用split()将段落拆分为正确的句子?   java阻止直接访问动态创建的文件   如何在Java中检查同一层次结构中的对象列表   java应用程序意图在启动时不为null   AndroidAnnotations SharedReferences中的java模拟链式方法调用   java如何处理这种多线程场景的问题?   java缓冲区与JVM外部不安全   java使用Spring SAML从https加载元数据   java在JDOQL中舍入一个值   java显示不匹配的字符串,正则表达式否定   数组Java接口及其实现   适用于web分析的java数据库?   SpringMVC问题中的java表单创建