Is elixir out-dated?

526 Views Asked by At

My sqlalchemy is 0.6.3, and elixir is 0.7.1

I created a model class which extends Entity:

from elixir import *
class User(Entity):
    pass

And save the a user as:

user = User()
user.save()

It reports Session has no attribute 'save'

I looked into the code of elixir, found it invokes sqlalchemy.org.session.Session#save(), but there is no save() method there.

So, is elixir outdated, and we should not use it any more?

2

There are 2 best solutions below

1
On BEST ANSWER

I am using the same versions of SQLAlchemy and Elixir so it is definitely compatible. Not sure what you are trying to do with the above code.

0
On

Remember to call setup_all(True) before doing anything with session or query. This will do the necessary ORM mappings for the session and the query to work properly.