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

This package implements a very minimal upgrade framework for use in Python applications. Its design consists of three parts:

  1. context providers, which are responsible for setting up the context required for an upgrade step. For example establishing a connection to a SQL server or configuring SQLALchemy.
  2. upgrade steps, which are functions that perform the actual upgrade steps.
  3. a commandline tool to run the upgrade steps and required context providers.

In order to keep the framework minimal there are a few things which are deliberately not supported:

  • No versioning of the environment is done; the tool will always run all all upgrade steps. Each step must support being run multiple times without unexpected results.
  • Downgrades are not supported.
  • Depdendencies between upgrade steps are not supported.

Here is a basic context provider which configures SQLAlchemy:

@upgrade_context('sql')
def setup_sqlalchemy(options):
    engine = create_engine('postgresql:///projectA')
    return {'sql-engine': engine}

Here is an example upgrade step to add missing tables and indices in a project using SQLALchemy:

@upgrade_step(require=['sql'])
def add_missing_tables(environment):
    meta.metadata.create_all(environment['sql-engline'])

And this is how you run the upgrade:

$ bin/upgrade --scan my.package
Release History

Release History

1.3

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.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

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
s4u.upgrade-1.3.tar.gz (11.7 kB) Copy SHA256 Checksum SHA256 Source Dec 19, 2013

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