I get access to a sizable database system. I must talk to it within an joyful manner.
Exist ORM framework like SQLAlchemy (I understand SQLAlchemy) that doesn't require we to define all qualities for courses of instruction for each database tables?
Since the database has already been there, my goal would be to avoid creating qualities for classes.
Using SQLAlchemy's more self examination features it is simple to enough possess a metaclass that provides a new planned class given a table title. The course still needs to be defined, but you do not have to define it.
def introspect(tablename, *mapper_args, **mapper_kwargs): u'given a table name and optional mapper arguments return an ORM class' global metadata # or pass it in, or use OO, whatever global engine # or pass it in, or use OO, whatever table = sqlalchemy.Table(tablename, metadata, autoload=True, autoload_with=engine) class DynamicClass: pass # you can provide nice __init__, __str__ methods return sqlalchemy.orm.mapper(DynamicClass, table, *mapper_args, **mapper_kwargs)
Hibernate includes a similar more self examination feature, however it creates Java source files, and for that reason is really a build-time, not run-time, operation.