Skip to main content
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!

JIRA support for Flask without breaking PyCharm inspections.

Project Description

A simple JIRA extension for Flask. Supports basic authentication and OAuth.

Supported Platforms

  • OSX and Linux.
  • Python 2.6, 2.7, 3.3, 3.4
  • Flask 0.10.1
  • JIRA 0.21

Probably works on other versions too.

Quickstart

Install:

pip install Flask-JIRA-Helper

Example:

# example.py
from flask import Flask
from flask.ext.jira import JIRA

app = Flask(__name__)
app.config['JIRA_SERVER'] = 'https://jira.mycompany.com'
app.config['JIRA_USER'] = 'jdoe'
app.config['JIRA_PASSWORD'] = 'SuperSecretP@ssw0rd'
jira = JIRA(app)

print jira.projects()

Factory Example

# extensions.py
from flask.ext.jira import JIRA

jira = JIRA()
# application.py
from flask import Flask
from extensions import jira

def create_app():
    app = Flask(__name__)
    app.config['JIRA_SERVER'] = 'https://jira.mycompany.com'
    app.config['JIRA_USER'] = 'service'
    app.config['JIRA_PASSWORD'] = 'SuperSecretP@ssw0rd'
    jira.init_app(app)
    return app
# manage.py
from application import create_app

app = create_app()
app.run()

Configuration

Flask-JIRA-Helper subclasses jira.client.JIRA and adds the init_app() method for delayed initialization (for applications that instantiate extensions in a separate file, but run init_app() in the same file Flask() was instantiated).

The following config settings are searched for in the Flask application’s configuration dictionary:

  • JIRA_SERVER – URL to JIRA server.
  • JIRA_USER – HTTP Basic authentication user name.
  • JIRA_PASSWORD – HTTP Basic authentication password.
  • JIRA_TOKEN – OAuth authentication access token.
  • JIRA_SECRET – OAuth authentication access token secret.
  • JIRA_CONSUMER – OAuth authentication consumer key.
  • JIRA_CERT – OAuth authentication key certificate data.
  • JIRA_IGNORE_INITIAL_CONNECTION_FAILURE – Ignore ConnectionError during init_app() for testing/development.

Changelog

0.2.0

  • Added JIRA_IGNORE_INITIAL_CONNECTION_FAILURE option.
  • Added Python 2.6 and 3.x support.

0.1.2

  • Fixed AttributeError when JIRA is instantiated but init_app() isn’t called.

0.1.1

  • Clearer error message when no credentials are specified.

0.1.0

  • Initial release.
Release History

Release History

This version
History Node

0.2.0

History Node

0.1.2

History Node

0.1.1

History Node

0.1.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
Flask-JIRA-Helper-0.2.0.tar.gz (5.7 kB) Copy SHA256 Checksum SHA256 Source Aug 10, 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