Giter Site home page Giter Site logo

Some architecture questions about redisco HOT 2 OPEN

iamteem avatar iamteem commented on September 24, 2024
Some architecture questions

from redisco.

Comments (2)

iamteem avatar iamteem commented on September 24, 2024

Hi!

When queries are made through a class, a Manager is the one that handles that query. It allows for chaining several methods to a single ModelSet - this will give you some kindDSL. This was the plan, but I don't think it's finished.

The key class is for generating the keys to be used when storing stuff in Redis.
Example:

k = Key('Person')
k['1']['name'] # => 'Person:1:name'

Validation is supposed to handle validations - but I think I baked it in somewhere in the attributes.py - I opted to follow how appengine does it, passing validator functions when defining attributes to a model.

utils.py should contain just a bunch of helper functions. _encode_key encodes strings to base64. Strings that are stored in keys are base64 encoded.

ModelBase is the metaclass of the Model. I can't remember why I used functions :|

from redisco.

uhbif19 avatar uhbif19 commented on September 24, 2024

When queries are made through a class, a Manager is the one that handles that query. > It allows for chaining several methods to a single ModelSet - this will give you some
kindDSL. This was the plan, but I don't think it's finished.

If object is field (not method) it means that object is constant at every call. In a reality every object geting prodce new ModelSet instance.

IMHO SQLAlchemy-style will be more clear and simple.

Ex:

m = Model()

m.query() # is ModelSet

example patch: https://github.com/uhbif19/redisco/commit/612682efe09e7c7b2566100c612404d3fb5808dc

That are you thinking about it ?

from redisco.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.