This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

pyramid_sqlalchemy provides some basic glue to facilitate using SQLAlchemy with Pyramid.

SQLAlchemy relies on global state for a few things:

  • A MetaData instance which tracks all known SQL tables.
  • A base class for all models using the ORM.
  • A session factory.

Every application using SQLAlchemy must provides its own instance of these. This makes it hard create add-on packages that also use SQLAlchemy, since they either need to have their own SQLAlchemy state, which makes it hard to integrate them into your application, or they need to jump through multiple complex hoops to allow them share state with your application.

pyramid_sqlalchemy helps by providing a canonical location for the global SQLAlchemy state. In addition it provides a convenient way to configure SQLAlchemy in a Pyramid application.

from pyramid.config import Configurator
from pyramid_sqlalchemy import BaseObject

class MyModel(BaseObject):
    __tablename__ = 'my_model'
    ...

def main():
    config = Configurator()
    # Configure SQLAlchemy using settings from the .ini file
    config.include('pyramid_sqlalchemy')
    ...
    return config.make_wsgi_app()

Changelog

1.6 - January 4, 2016

  • Update transaction pytest fixture to not mock out transation.get() completely, but only the commit() transaction method. This fixes problems with code trying to write on the current transaction.

1.5 - December 30, 2015

  • Fix a compatibility error with the DatabaseTestCase class which could break functional test setup.
  • Code reorganisation: move tests outside the package; there is no point in installing them.

1.4 - November 25, 2015

  • Revert naming convention change. This change broke all existing data models which did not supply a constraint name everywhere. This is especially bad for types which implicitly create unnamed constraints, such as booleans and enums on dialects that do not have native support.

1.3 - November 23, 2015

  • Configure a default naming convention, as recommended by alembic). Pull request 3 from Marcin Lulek.
  • Fix a broken import in pyramid_sqlalchemy’s own test when running on Python 3.
  • Allow overriding the database used for testing with the pytest --sql-url option when using the DatabaseTestCase test class. For non-pytest users support the DB_URI environment variable as well.

1.2.2 - September 11, 2014

  • Add dependency on mock for Python <3.3. This fixes import problems who try to import pyramid_sqlalchemy.testing in production code.

1.2.1 - September 1, 2014

  • Move pyramid to a test-only dependency. This makes it simpler to use pyramid_sqlalchemy in non-pyramid contexts.

1.2 - August 30, 2014

  • Use unittest.mock when available. This removes the mock dependency on Python 3.
  • Tests no longer need to mock out pyramid_sqlalchemy.includeme; this is now handled by DatabaseTestCase and the py.test fixtures.
  • Automatically make py.test fixtures available externally. This removes the need to copy & paste them over from the documentation.
  • Fix error on pytest fixture example.
  • Setup Travis to automatically run tests on CPython 2.6, CPython 2.7, CPython 3.3, CPython 3.4 and PyPy.

1.1 - July 14, 2014

  • Add missing schema to the Pyramid-URL in the package description. This broke ReST rendering on the PyPI page.
  • Add a new enable_sql_two_phase_commit() configuration directive to enable two-phase commit.
  • Enable foreign key constraint checking for SQLite in DatabaseTestCase.
  • Use SQLAlchemy events instead of ZopeTransactionExtension to handle integration of zope.sqlalchemy and SQLAlchemy.

1.0 - July 13, 2014

  • First release.
Release History

Release History

1.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyramid_sqlalchemy-1.6-py2.py3-none-any.whl (12.2 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Jan 4, 2016
pyramid_sqlalchemy-1.6.tar.gz (16.4 kB) Copy SHA256 Checksum SHA256 Source Jan 4, 2016

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