[google-appengine] Re: Datastore Entity

2008-10-24 Thread yejun
I think you mean kind. Newkind = type("KindName", (db.model,), dict(p1=db.Property(), p2...)) On Oct 24, 5:45 pm, Koren <[EMAIL PROTECTED]> wrote: > hi, > > is it possible to create a datastore entity at runtime? > i have the situation that i need to create new Entities (and not > records) durin

[google-appengine] Re: Datastore Entity

2008-10-24 Thread ryan
it sounds like you want to specify the *kind* of an entity dynamically, at runtime? this isn't easy with db, but it is with the lower-level, undocumented google.appengine.api.datastore module. see the docstrings for the top- level classes and functions in that module: http://code.google.com/p/go

[google-appengine] Re: Datastore Entity

2008-10-25 Thread Koren
Thanks! so can i do soemthing like: Newkind = type("KindName", (db.expando,)) obj1 = KindName() ? On Oct 25, 12:14 am, yejun <[EMAIL PROTECTED]> wrote: > I think you mean kind. > > Newkind = type("KindName", (db.model,), dict(p1=db.Property(), p2...)) > > On Oct 24, 5:45 pm,Koren<[EMAIL PROTECT

[google-appengine] Re: Datastore Entity

2008-10-25 Thread yejun
I think this should work as well. I only tried db.Model though. On Oct 25, 3:36 am, Koren <[EMAIL PROTECTED]> wrote: > Thanks! > so can i do soemthing like: > Newkind = type("KindName", (db.expando,)) > > obj1 = KindName() > > ? > > On Oct 25, 12:14 am, yejun <[EMAIL PROTECTED]> wrote: > > > I th

[google-appengine] Re: Datastore Entity

2008-10-25 Thread yejun
Actually, you still need to supply a empty dict object anykind = type("KindName", (db.Expando,), dict()) obj1 = anykind() obj1.put() Here "anykind" is just a variable name, it is not necessary to match KindName, but KindName is the name used for datastore. On Oct 25, 3:36 am, Koren <[EMAIL PRO

[google-appengine] Re: Datastore Entity

2008-11-03 Thread bFlood
thanks calvin, that's great information. I'm guessing from your articles that GAE would probably *not* limit the number of entities,which is great. also, Is there a Part 3 yet :) cheers brian On Nov 3, 8:50 am, "Calvin Spealman" <[EMAIL PROTECTED]> wrote: > Not to look like im just self promotin

[google-appengine] Re: Datastore Entity

2008-11-03 Thread Calvin Spealman
Not to look like im just self promoting, but I do think i have a good coverage of the lower level that is often useful in these situations: http://techblog.ironfroggy.com/2008/08/how-to-understand-appengine-datastore.html On Fri, Oct 24, 2008 at 7:21 PM, ryan <[EMAIL PROTECTED]> wrote: > > it so

[google-appengine] Re: Datastore Entity

2008-11-03 Thread bFlood
hi ryan is there any limit to the number of "kinds" you can dynamically create? is there a way to create dynamic indexes for these kinds as well? thx brian On Oct 25, 2:49 am, yejun <[EMAIL PROTECTED]> wrote: > Actually, you still need to supply a empty dict object > anykind = type("KindName",

[google-appengine] Re: Datastore Entity

2008-11-04 Thread Rodrigo Moraes
> On Oct 25, 2:49 am, yejun wrote: >> Actually, you still need to supply a empty dict object >> anykind = type("KindName", (db.Expando,), dict()) >> >> obj1 = anykind() >> obj1.put() >> >> Here "anykind" is just a variable name, it is not necessary to match >> KindName, but KindName is the name us