arachnid / aetycoon Goto Github PK
View Code? Open in Web Editor NEWaetycoon provides a library of useful App Engine datastore property classes.
aetycoon provides a library of useful App Engine datastore property classes.
Hey,
Maybe I'm missing something, but aetycoon doesn't include a license file or notice. Could you please add one?
from the docstring,
class DatastoreFile(db.Model):
... @DerivedProperty(name='sha1')
... def hash(self):
... return hashlib.sha1(self.data).hexdigest()
I would expect the property to be named 'sha1', not 'hash'. But actually it is 'hash',
file.hash
'943a702d06f34599aee1f8da8ef9f7296031d699'
file.sha1 will raise an AttributeError.
Here's the post:
http://googleappengine.blogspot.com/2009/07/writing-custom-property-classes.html
Just so that there's not much duplication everywhere.
If people set a validator in aetycoon property constructors, it is never used because validate() is never called. Properties should call validate() in get_value_for_datastore() to honor custom validators.
I am having some trouble using the transform property type.
In the case that the property being transformed is None or '', then this line throws an error:
if last_val == current_val:
return getattr(model_instance, self.__transformed_attr_name()) <- throws 'AttributeError: 'Foo object has no attribute '_derivedField' '
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.