[PonyORM-list] Creating Dynamic Classes in Pony (need help)

Alexander Kozlovsky alexander.kozlovsky at gmail.com
Sun Mar 15 21:46:19 UTC 2015


Hi Ivan!

What database do you plan to use? Is it SQLite, PostgreSQL or something
else?

When you loading your info from "xls" files, what do you expect to do with
these data? Is it intended to be stored in the database for a long time, or
do you just want to temporary load information to the database, process it
and then store result somewhere else?



On Sun, Mar 15, 2015 at 11:13 PM, Ivan Evstegneev <webmailgroups at gmail.com>
wrote:

> Hello,
>
> First of all, I'm absolutely new to DBs and relatively new to Python )))).
>
> But got my work to do (EE student  project). So please don't blame me for
> incorrect terminology.
>
> My question is simple (at least it seems so to me ^_^):
>
> Is it possible to create a dynamic classes with pony_orm?
>
> Something similar to this:
>
>
> http://stackoverflow.com/questions/2827623/python-create-object-and-add-attr
> ibutes-to-it
>
> or this:
>
>
> http://code.activestate.com/recipes/52308-the-simple-but-handy-collector-of-
> a-bunch-of-named/?in=user-97991
>
>
> By "dynamic" I mean that class attributes are not static.
>
> For instance, let's say I have some "node.xls" file which contains some
> table as this one:
>
>                                 param1    param2........ parmaN
>
> element1              value 1    value2...........valueN
> element2              value 1    value2...........valueN
> .
> .
>
> element              value 1    value2...........valueN
>
> So I might define a class in pony_orm  which will be called as Node() and
> would include all those (param1 to paramN) and then just assign their
> values.
>
> But this is a static way. What happens when I'll ( at some time) add
> param(N+1) into my "node.xls"? So in such case I would need to redefine
> Node() class.
> Sounds not so hard task to do... But if there some more "xls" files  and
> more params will be added over time to each one of them...
> I would definitely get into trouble, by spending all my free time to
> actually make it up-to-date.
>
>
> Hope my question clear enough.
>
> Any provided help(ideas, code snippets of possible realization, links
> etc.)
> will be highly appreciated.
>
> Thanks a lot in advance,
>
> Ivan.
>
>
> _______________________________________________
> ponyorm-list mailing list
> ponyorm-list at ponyorm.com
> /ponyorm-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </ponyorm-list/attachments/20150316/158a7f31/attachment.html>


More information about the ponyorm-list mailing list