kiddouk / redisco

A Python Library for Simple Models and Containers Persisted in Redis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

some feature request

liuliqiang opened this issue · comments

i'm so happy to find out your good project --redisco
and i try this lib in my personal project
however i think it can be better if it has more feature such as:

  1. add options in fields, so we can define the field like this:
    status = Attribute(required=True, options=['draft', 'private', 'publish', 'trash']
  2. add Reference List Field, such we can has a reference field list like:
    categories = ListField(ReferenceField('Category'))
  3. i found that all index field in redis was saves index as a set, whether can we save it as a string
    if we set this field unique=True

that's all my suggestion, i hope it can help improve redisco...thx..

For #1 it looks like you want a feature like djangos ChoiceField.

#2 looks like a variation on #1 (especially if options could accept a callable).

Different storage strategies seems like it could be interesting, though I guess it complicates the implementation slightly, maybe you would be up for doing an example implementation for one of the field types ?