I am trying to create a web application using Pylons and the resources on the web point to the PylonsBook page which isn't of much help. I want authentication and authorisation and is there anyway to setup Authkit to work easily with Pylons?
I tried downloading the SimpleSiteTemplate from the cheeseshop but wasn't able to run the setup-...
How do I select a(or some) random row(s) from a table using SQLAlchemy?
...
all the docs for sql alchemy give INSERT and UPDATE examples using the local table instance (i.e. tablename.update()... )
doing this seems difficult with the declarative syntax, I need to reference Base.metadata.tables["tablename"] for get the table reference.
Am I sposed to do this another way? Is there a different syntax for INSERT...
Hi everyone!
I'm looking for opinions on the DBCook framework as a declarative wrapper for SQLAlchemy.. Has anyone used it?
Thanks for your time!
...
I've been working on a very simple crud generator for pylons. I came up with something that inspects
SomeClass._sa_class_manager.mapper.c
Is it ok to inspect this (or to call methods begining with underscore)? I always kind of assumed this is legal though frowned upon as it relies heavily on the internal structure of a class/object. ...
I'm trying to develop an app using turbogears and sqlalchemy.
There is already an existing app using kinterbasdb directly under mod_wsgi on the same server.
When both apps are used, neither seems to recognize that kinterbasdb is already initialized
Is there something non-obvious I am missing about using sqlalchemy and kinterbasdb in sepa...
Is there a way to define a column (primary key) as uuid in sqlalchemy if using postgresql?
...
I would like to use Pylons with Elixir, however, I am not sure what is the best way to get about doing this. There are several blog posts (cleverdevil, beachcoder, adam hoscilo) and even an entire new framework about how to go about doing this; however, I am not certain about the differences between them. Which one is the best to use? Am...
What are best resources/tutorials for starting up with SQLAlchemy?
Maybe some simple step by step stuff like creating a simple table and using it and going up from there.
...
Does SQLAlchemy support some kind of caching so if i have lots of time the same query it would return the response from cache instead of querying the database until i clear the cache for that query because i updated de db?
Or what's the best way to implement this on a CherryPy,SQLAlchemy setup?
...
I have a table called logs which has a datetime field.
I want to select the date and count of rows based on a particular date format.
How do I do this using SQLAlchemy?
...
I can't find any proper documentation on how to specify relations
using the declarative syntax of SQLAlchemy.. Is it unsupported? That is, should I use the "traditional" syntax?
I am looking for a way to specify relations at a higher level, avoiding having to mess with foreign keys etc.. I'd like to just declare "addresses = OneToMany(Ad...
With SQLAlchemy, is there a way to know beforehand whether a relation would be lazy-loaded?
For example, given a lazy parent->children relation and an instance X of "parent", I'd like to know if "X.children" is already loaded, without triggering the query.
...
I'm using SQLAlchemy 0.5rc, and I'd like to add an automatic filter to a relation, so that every time it tries to fetch records for that relation, it ignores the "remote" ones if they're flagged as "logically_deleted" (a boolean field of the child table)
For example, if an object "parent" has a "children" relation that has
3 records, bu...
I'm starting a new application and looking at using an ORM -- in particular, SQLAlchemy.
Say I've got a column 'foo' in my database and I want to increment it. In straight sqlite, this is easy:
db = sqlite3.connect('mydata.sqlitedb')
cur = db.cursor()
cur.execute('update table stuff set foo = foo + 1')
I figured out the SQLAlchemy S...
What is the sqlalchemy equivalent column type for 'money' and 'OID' column types in Postgres?
...
I use SQLAlchemy at work and it does the job really fine. Now I am thinking about best practices.
For now, I create a module holding all the SQLA stuff :
my_model
|__ __init__.py
|__ _config.py <<<<< contains LOGIN, HOST, and a MetaData instance
|__ table1.py <<<<< contains the class, the model and the mappe...
How do I translate something like this into SQLAlchemy?
select x - y as difference...
I know how to do:
x.label('foo')
...but I'm not sure where to put the ".label()" method call below:
select ([table.c.x - table.c.y], ...
...
How do I translate something like this into SQLAlchemy?
SELECT (a * b) - (x + y) / z AS result
FROM table
ORDER BY result
...
I've got several function where I need to do a one-to-many join, using count(), group_by, and order_by. I'm using the sqlalchemy.select function to produce a query that will return me a set of id's, which I then iterate over to do an ORM select on the individual records. What I'm wondering is if there is a way to do what I need using t...