python的redis中的对象

odis的Python项目详细描述


#ODIS

odis-python的[redis](http://redis.io)中的对象。

##安装ODIS

$ pip install git+git://github.com/simonz05/odis.git

##使用ODIS

from odis import Model, CharField, DateTimeField

class Foo(Model):
username = CharField(index=True, unique=True) created_at = DateTimeField(aut_now_add=True)
>>> obj = Foo(username='foo')
>>> obj.save()
True
>>> Foo.obj.get(username='foo')
<Foo {'username': 'foo', 'pk': 1, 'created_at': datetime.datetime(2012, 1, 14, 0, 0)}>
>>> Foo.obj.filter(username='foo')
<odis.QuerySet at 0x24e50d0>

##确认

[Ohm](http://ohm.keyvalue.org/)、[redisco](https://github.com/iamteem/redisco/)和 [Django内部](https://github.com/django/django/tree/master/django/db/models) 用来解决类似的问题。

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

推荐PyPI第三方库


热门话题
库伯内特斯的爪哇普罗米修斯jmx_出口商   在Java中使用通配符(仅限最后一个索引)验证ip地址的正则表达式   对象类的java equals()方法   java spring boot(webflux)rest控制器获取远程IP地址   crc Java在同一字符串上返回不同的CRC32结果   包含数字和字母的java排序数组列表   java更改一个类变量的值,然后在另一个类中调用它   java Do While循环终止,不执行scanner函数   作为cron作业运行的linux Java控制台应用程序存在相对路径问题   安卓如何使用HttpUrlConnect使用java查询Github graphql API   视频在java中如何将字节缓冲区写入一半?   安卓如何通过java将RadioButton添加到RadioGroup?   具有TARGET_类代理模式的java请求_作用域bean在注入到其他组件(如@Service或@Repository)中时只能看到空参数