{ "info": { "author": "@Robpol86", "author_email": "robpol86@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: MacOS X", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries", "Topic :: Text Processing :: Markup" ], "description": "jira-context\r\n============\r\n\r\nDo you have command line applications which interact with JIRA servers?\r\nDo your users have to enter their credentials every time they run your\r\napplications? Are you unable to use OAuth because your command line\r\napplication is open sourced or you have no way of securing the consumer\r\nsecret?\r\n\r\nHi, Robpol86 here for jira-context. The easy way to prompt for\r\ncredentials and cache session cookies on your clients\u2019 workstations.\r\n\r\n``jira-context`` is supported on Python 2.6, 2.7, 3.3, and 3.4.\r\n\r\n|Build Status| |Coverage Status| |Latest Version| |Downloads| |Download format| |License|\r\n\r\nQuickstart\r\n----------\r\n\r\nInstall:\r\n\r\n.. code:: bash\r\n\r\n pip install jira-context\r\n\r\nUsage\r\n-----\r\n\r\n.. code:: python\r\n\r\n # example.py\r\n from __future__ import print_function\r\n import sys\r\n from jira_context import JIRA\r\n\r\n server = 'https://jira.company.local'\r\n query = 'assignee = currentUser() AND resolution = Unresolved'\r\n if len(sys.argv) == 2:\r\n JIRA.FORCE_USER = sys.argv[1]\r\n\r\n print('Connecting to: ' + server)\r\n with JIRA(server=server) as j:\r\n if j.ABORTED_BY_USER:\r\n print('Aborted by user.', file=sys.stderr)\r\n sys.exit(1)\r\n issues = j.search_issues(query, maxResults=5)\r\n\r\n for issue in issues:\r\n print(issue.key, issue.fields.summary)\r\n\r\n::\r\n\r\n $ python example.py\r\n Connecting to: https://jira.company.local\r\n JIRA username: does_not_exist\r\n JIRA password:\r\n Authentication failed or bad password, try again.\r\n JIRA username:\r\n Aborted by user.\r\n $ python example.py $USER\r\n Connecting to: https://jira.company.local\r\n JIRA password:\r\n FAKE-659 service solahart hp 082113812149\r\n FAKE-620 Need new version to be compatible in Jira 6.3.1\r\n FAKE-525 Half page become blank when Activity Stream gadget view as Wallboard\r\n FAKE-468 create page and with custom fields\r\n FAKE-022 As a burndown gadget I should support GH 6.0+\r\n $ python example.py\r\n Connecting to: https://jira.company.local\r\n FAKE-659 service solahart hp 082113812149\r\n FAKE-620 Need new version to be compatible in Jira 6.3.1\r\n FAKE-525 Half page become blank when Activity Stream gadget view as Wallboard\r\n FAKE-468 create page and with custom fields\r\n FAKE-022 As a burndown gadget I should support GH 6.0+\r\n\r\nClass Attributes\r\n----------------\r\n\r\nPersisted\r\n~~~~~~~~~\r\n\r\nThese attributes/variables are persisted throughout the lifetime of\r\nthe currently running process. If you\u2019ve got two\r\n``with`` blocks and ``ABORTED_BY_USER`` becomes True in the first one,\r\nthe second block will skip authentication.\r\n\r\n+------------------------------+------------------------------------------------------------------------------------------------------------------+\r\n| Name | Description/Notes |\r\n+==============================+==================================================================================================================+\r\n| ``ABORTED_BY_USER`` | False by default. Becomes True if ``USER_CAN_ABORT`` is True and the user enters a blank username or password. |\r\n+------------------------------+------------------------------------------------------------------------------------------------------------------+\r\n| ``COOKIE_CACHE_FILE_PATH`` | File path to the cache file used to store the base64 encoded session cookie. |\r\n+------------------------------+------------------------------------------------------------------------------------------------------------------+\r\n| ``FORCE_USER`` | If set to a string, user won\u2019t be prompted for their username. |\r\n+------------------------------+------------------------------------------------------------------------------------------------------------------+\r\n| ``USER_CAN_ABORT`` | Set to False if you don\u2019t want the user to continue without a JIRA session if they enter a blank user/pass. |\r\n+------------------------------+------------------------------------------------------------------------------------------------------------------+\r\n\r\nInstance\r\n~~~~~~~~\r\n\r\nThese attributes are persisted only in the current JIRA() instance.\r\n\r\n+------------------------------+---------------------------------------------------------------------------------------------------+\r\n| Name | Description/Notes |\r\n+==============================+===================================================================================================+\r\n| ``prompt_for_credentials`` | Instantiate with False if you don\u2019t want the user prompted for credentials (useful in threads). |\r\n+------------------------------+---------------------------------------------------------------------------------------------------+\r\n| ``authentication_failed`` | Becomes True if ``prompt_for_credentials`` is False and cached cookies were invalid/missing. |\r\n+------------------------------+---------------------------------------------------------------------------------------------------+\r\n\r\n.. |Build Status| image:: https://travis-ci.org/Robpol86/jira-context.svg?branch=master\r\n :target: https://travis-ci.org/Robpol86/jira-context\r\n.. |Coverage Status| image:: https://img.shields.io/coveralls/Robpol86/jira-context.svg\r\n :target: https://coveralls.io/r/Robpol86/jira-context\r\n.. |Latest Version| image:: https://pypip.in/version/jira-context/badge.png\r\n :target: https://pypi.python.org/pypi/jira-context/\r\n.. |Downloads| image:: https://pypip.in/download/jira-context/badge.png\r\n :target: https://pypi.python.org/pypi/jira-context/\r\n.. |Download format| image:: https://pypip.in/format/jira-context/badge.png\r\n :target: https://pypi.python.org/pypi/jira-context/\r\n.. |License| image:: https://pypip.in/license/jira-context/badge.png\r\n :target: https://pypi.python.org/pypi/jira-context/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Robpol86/jira-context", "keywords": "jira", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "jira-context", "package_url": "https://pypi.org/project/jira-context/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/jira-context/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Robpol86/jira-context" }, "release_url": "https://pypi.org/project/jira-context/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Cache JIRA basic authentication sessions to disk for console apps.", "version": "1.0.0" }, "last_serial": 1283770, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "f08ecd6a1673e8d8268e63e977d60aca", "sha256": "21e66f592bd3a1b1fde0240dba6766c9baccf0c619b473f749089ef886e69f94" }, "downloads": -1, "filename": "jira-context-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f08ecd6a1673e8d8268e63e977d60aca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7049, "upload_time": "2014-10-27T03:41:23", "url": "https://files.pythonhosted.org/packages/b7/e1/9f8fb988586ed368ed993180f525f2f11b611079c36ba0cc7dc4794286a5/jira-context-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f08ecd6a1673e8d8268e63e977d60aca", "sha256": "21e66f592bd3a1b1fde0240dba6766c9baccf0c619b473f749089ef886e69f94" }, "downloads": -1, "filename": "jira-context-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f08ecd6a1673e8d8268e63e977d60aca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7049, "upload_time": "2014-10-27T03:41:23", "url": "https://files.pythonhosted.org/packages/b7/e1/9f8fb988586ed368ed993180f525f2f11b611079c36ba0cc7dc4794286a5/jira-context-1.0.0.tar.gz" } ] }