Questions tagged [python-elixir]

A Python library that sits upon SQLAlchemy

Elixir is a Python library that sits on top of SQLAlchemy. Questions using this tag should also be tagged .

Further reading:

76 questions
0
votes
1 answer

Sharing model between Camelot and non-Camelot apps

I would like to share my data model between different Elixir/SQLAlchemy applications, one of which would be a Camelot UI and the others stuff like web interfaces and so on. They would all connect to the same underlying database. As far as I know, to…
Luke404
  • 10,282
  • 3
  • 25
  • 31
0
votes
1 answer

Using Elixir, how can I get the table object of a self-referential relationship to perform inserts on?

I'm using Elixir with SQLite and I'd like to perform multiple inserts as per the docs: http://www.sqlalchemy.org/docs/05/sqlexpression.html#executing-multiple-statements However, my ManyToMany relationship is self-referential and I can't figure out…
Stavros Korokithakis
  • 4,680
  • 10
  • 35
  • 42
0
votes
1 answer

How do I create self-relationships in polymorphic inheritance in Elixir and Pylons?

I am new to programming and am following the example in the Pylons documentation on creating a Wiki. The database I want to link to the wiki was created with Elixir so I rewrote the Wiki database schema and have continued from there. In the wiki…
Turukawa
  • 155
  • 2
  • 11
0
votes
1 answer

Elixir create_all() not creating database and tables

I'm using Elixir 0.7.1 , Sqlalchemy 0.6beta1 , MySQLdb 1.2.2. My Model file 'model.py' looks like this: from elixir import * from datetime import datetime class Author: first_name = Field(Unicode(64)) last_name = Field(Unicode(64)) class…
Arek B.
  • 577
  • 1
  • 6
  • 10
0
votes
1 answer

"Expanding" a reflexive Many to Many relationship in SQLAlchemy

Using Elixir 0.7.1 and SQLAlchemy 0.7.8, I've created a model having a many-to-many relationship back to itself, which looks like: from elixir import * class MyModel(Entity): name = Field(Unicode(30)) related = ManyToMany('MyModel') Now,…
0
votes
1 answer

When to stop using Elixir?

If you have a python database wrapper using Elixir, with a pretty straightforward 'Active Record' design (1 object to 1 table), but then you begin to expand... At what point should you stop using Elixir? Are there any common milestones/symptoms that…
user2097818
  • 1,821
  • 3
  • 16
  • 34
0
votes
1 answer

Python SQLAlchemy/Elixer Question

I am trying to define a SQLAlchemy/Elixer model that can describe the following relationship. I have an SSP table, which has multiple Foreign Keys to the POC table. I've defined the ManyToOne relationships correctly within the SSP object (allowing…
Michael Wales
  • 10,360
  • 8
  • 28
  • 28
0
votes
1 answer

Using python and elixir to send emails utilizing db tables with foreign keys

I have a python script that pulls information from a single database table and sends a weekly update email to users. I'd like to find a way to modify my code to allow for normalizing the structure and putting all of the investigator info (prefix,…
Joseph
  • 290
  • 5
  • 15
0
votes
1 answer

Where do I commit changes to DB in QAbstractTableModel?

I'm writing an app using python2, qt and elixir. The app fetches data from the sqlite databate to a list of elixir objects and store that in a variable inside a QAbstractTableModel subclass I created to handle the data. I can view and update the…
0
votes
1 answer

Creating a Generative Search with Elixir

I'm stuck using Elixir and I currently have a really messy way of searching through a database that i'd like to improve. The documentation provides insight on how to do a basic generative search but I need to step through many different classes and…
0
votes
1 answer

UnitTest : Can't add many to many relations : Integrity error (seems delete do not do his job)

I have two tables : Person & Team ; each has a Many-To-Many relation with the other. I do this in the setUp function (called before each function of testing, 3 times in my case) p = Person(fname=u"John", lname=u"Doe") Team(name=u"Anon",…
DKF
  • 407
  • 3
  • 5
  • 10
0
votes
1 answer

Is it possible to tag elixir/sqlalchemy fields/columns with extra properties?

I'd like to mark some columns in my entities as Searchable -- ideally in a clean way, on a per-column basis. Is it possible to "tag", or add a property to the column definition in the class? Elsewhere in the code, I'd like to be able to pick up the…
btk
  • 3,158
  • 2
  • 29
  • 30
0
votes
1 answer

Length Limit for MySQL Identifiers (table names, column names) using SQLAlchemy with Elixir

I am using SQLAlchemy with Elixir and everything works fine using SQLite. However, when I switch to MySQL there is a table name and column name length limit (64 characters). I have quite a lot of entities with several ManyToMany relationships and I…
Daniel
  • 311
  • 3
  • 12
0
votes
2 answers

Elixir Entity with a list of tuples in it. ex. Cooking Recipe with list of (ingrediant, quantity) tuple

I'm trying to build an elixir model in which I have a class with a list(of variable size) of tuples. One example would be a recipe while I can do something like this: class Recipe(Entity): ingrediants = OneToMany('IngrediantList') …
TMaYaD
  • 681
  • 7
  • 12
-1
votes
1 answer

Elixir EntityCollection.remove() doesn't work

I'm trying to remove a certain Entity from the collection in a EntityCollection, which is not working, results in an exception: list.remove(x): x not in list. Code excerpt as follows: user.platformSubscriptions.remove(platform) The platform variable…
ronalddddd
  • 111
  • 2
  • 8