3 ms·
Very nice. I did something very similar for an RPC server I wrote, but it's less general and relies on the ORM (SQLAlchemy). Essentially, it turns database id's
by grncdr 15y ago
Very nice. I did something very similar for an RPC server I wrote, but it's less general and relies on the ORM (SQLAlchemy). Essentially, it turns database id's into the mapped objects, checks the objects against the constraints declared as arguments to the decorator (much like this module), and then passes the mapped objects in to the original function in place of the id. It's proven to be a very useful pattern, but I'll probably use this library instead for future projects.