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>;。`_
图片::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>;。`_