Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Tools for Python Apps on OpenShift Red Hat Cloud

Project Description
# shiftpy
Tools for running Python Apps on OpenShift Red Hat Cloud

[![Build Status](](
[![Code Health](](

<a target="_blank" href=";business=rochacbruno%40gmail%2ecom&amp;lc=BR&amp;item_name=ShiftPy&amp;no_note=0&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest"><img alt='Donate with Paypal' src='' /></a>

# installation

```pip install shiftpy```

# Available tools

- env.getvar - Get openshift env var
- env.listvars - Print all openshift env vars
- env.getallvars - Get all vars as a dict
- wsgi_utils.envify - Wrap wsgi app in Openshift Virtualenv
- **ADD YOURS, please contribute**

# getvar

> from shiftpy.env import getvar
> print getvar('HOMEDIR')

# listvars

> from shiftpy.env import listvars
> listvars()
OPENSHIFT_HOMEDIR = 'app-root/w543543543543543/home/'
OPENSHIFT_APP_NAME = 'yourappname'

# getallvars

> from shiftpy.env import getallvars
> allvars = getallvars()
> print allvars
'OPENSHIFT_PYTHON_DIR': '/tmp/python'}


# envify

This will wrap your wsgi app in virtualenv to OpenShift

from shiftpy.wsgi_utils import envify
from myproject import app

# wsgi expects an object named 'application'
application = envify(app)


then your app will be available for wsgi_mod and virtualenv is activated
Release History

Release History

This version
History Node


History Node


History Node


History Node


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
shiftpy-0.1.3.tar.gz (3.8 kB) Copy SHA256 Checksum SHA256 Source Jul 31, 2015

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