This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Syntactic sugar for SQLAlchemy: a Storm ORM-like find method

Project Description

A find() method for SQLAlchemy

Usage:

from sqlalchemy_find import SessionWithFind, QueryWithFind
from sqlalchemy.orm import sessionmaker

# Configure engine and sessionmaker
engine = create_engine('postgresql://scott:tiger@localhost/')
Session = sessionmaker(bind=engine,
                       class_=SessionWithFind,
                       query_cls=QueryWithFind)

# Create a session
session = Session()

# Equivalent to:
#   query = session.query(MyClass)
#   query = query.filter(MyClass.name == 'foo')
#   query = query.filter_by(is_active=True)
query = session.find(MyClass, MyClass.name == 'foo', is_active=True)

# Equivalent to:
#   ob = session.query(MyClass).get(21)
ob = session.get(MyClass, id=21)

CHANGELOG

Version 0.1

  • Initial release
Release History

Release History

This version
History Node

0.1

History Node

0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
sqlalchemy-find-0.1.tar.gz (2.4 kB) Copy SHA256 Checksum SHA256 Source Jul 6, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting