To edit any of the wiki pages,
or to create or edit tickets,
please login as guest/guest.

About Elixir

Elixir is a declarative layer on top of the SQLAlchemy library. It is a fairly thin wrapper, which provides the ability to create simple Python classes that map directly to relational database tables (this pattern is often referred to as the Active Record design pattern), providing many of the benefits of traditional databases without losing the convenience of Python objects.

Elixir is intended to replace the ActiveMapper SQLAlchemy extension, and the TurboEntity project but does not intend to replace SQLAlchemy's core features, and instead focuses on providing a simpler syntax for defining model objects when you do not need the full expressiveness of SQLAlchemy's manual mapper definitions.

Example

Here is a very short model definition example. For some explanation and more complete examples, please have a look at the tutorial or at the examples page.

class Person(Entity):
    name = Field(String(128))
    addresses = OneToMany('Address')

class Address(Entity):
    email = Field(Unicode(128))
    owner = ManyToOne('Person')

History

In 2006, Jonathan LaCour discovered the fantastic SQLAlchemy project, and really liked its power and flexibility, but found that in many simple cases he would prefer a simpler and more attractive way to declare his model objects. As a result, Jonathan spent a few hours on a weekend to create the ActiveMapper SQLAlchemy extension. For a weekend's worth of work, it wasn't half bad, and gained a little bit of traction in the wild. But, over time, it became clear that ActiveMapper needed a lot of work to stabilize and become more useful.

Later that year, Daniel Haus released his own layer on top of SQLAlchemy, called TurboEntity. TurboEntity solved some of the problems of ActiveMapper, and took a slightly different approach to the problem. TurboEntity also began to gain some ground and it became clear to both Daniel and Jonathan that they needed to work together.

Around the same time, Gaëtan de Menten contacted both Jonathan and Daniel to reveal that he had been working on his own layer as well. A few weeks later, all three agreed to work together to create a replacement for TurboEntity and ActiveMapper using their collective experience and knowledge.

The Name

The Oxford English Dictionary defines Elixir as: "a magical or medicinal potion, a preparation that was supposedly able to change metals into gold, sought by alchemists."

The Future

Elixir is always looking for new contributors to help us document, extend, and improve Elixir.