{ "info": { "author": "Nicholas Achilles", "author_email": "nich@nich.tech", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "====================================\nlti: Learning Tools Interoperability\n====================================\nThis library is a fork of lti_lti_py_\nIt has been modified to accept non-standard params and bubble up useful\nerror messages in the form of exceptions to the caller. \n\n``lti`` is a Python library implementing the\nLearning Tools Interoperability (LTI) standard.\nIt is based on lti_lti_py_,\nwhich is based on dce_lti_py_,\nwhich is based on ims_lti_py_.\n\n.. _lti_lti_py: https://github.com/pylti/lti\n.. _dce_lti_py: https://github.com/harvard-dce/dce_lti_py\n.. _ims_lti_py: https://github.com/tophatmonocle/ims_lti_py\n\n\nInstallation\n============\n\n.. code-block:: sh\n\n pip install lti\n\n\nDependencies\n============\n\n* lxml_\n* oauthlib_\n* requests-oauthlib_\n\n.. _lxml: https://github.com/lxml/lxml\n.. _oauthlib: https://github.com/idan/oauthlib\n.. _requests-oauthlib: https://github.com/requests/requests-oauthlib\n\n\nUsage\n=====\n\nThe primary goal of this library is to provide classes\nfor building Python LTI tool providers (LTI apps).\nTo that end, the functionality that you're looking for\nis probably in the ``ToolConfig`` and ``ToolProvider`` classes (``ToolConsumer``\nis available too, if you want to consume LTI Providers).\n\n\nTool Config Example (Django)\n----------------------------\n\nHere's an example of a Django view you might use as the\nconfiguration URL when registering your app with the LTI consumer.\n\n.. code-block:: python\n\n from lti import ToolConfig\n from django.http import HttpResponse\n\n\n def tool_config(request):\n\n # basic stuff\n app_title = 'My App'\n app_description = 'An example LTI App'\n launch_view_name = 'lti_launch'\n launch_url = request.build_absolute_uri(reverse('lti_launch'))\n\n # maybe you've got some extensions\n extensions = {\n 'my_extensions_provider': {\n # extension settings...\n }\n }\n\n lti_tool_config = ToolConfig(\n title=app_title,\n launch_url=launch_url,\n secure_launch_url=launch_url,\n extensions=extensions,\n description = app_description\n )\n\n return HttpResponse(lti_tool_config.to_xml(), content_type='text/xml')\n\n\nTool Provider OAuth Request Validation Example (Django)\n-------------------------------------------------------\n\n.. code-block:: python\n\n from lti.contrib.django import DjangoToolProvider\n from my_app import RequestValidator\n from oauthlib.oauth1 import SignatureOnlyEndpoint\n\n # create the tool provider instance\n tool_provider = DjangoToolProvider.from_django_request(request=request)\n\n # the tool provider uses the 'oauthlib' library which requires an instance\n # of a validator class when doing the oauth request signature checking.\n # see https://oauthlib.readthedocs.org/en/latest/oauth1/validator.html for\n # info on how to create one\n validator = RequestValidator()\n\n # validate the oauth request signature\n ok = tool_provider.is_valid_request(SignatureOnlyEndpoint, validator)\n\n # do stuff if ok / not ok\n\n\nTool Consumer Example (Django)\n------------------------------\n\nIn your view:\n\n.. code-block:: python\n\n def index(request):\n consumer = ToolConsumer(\n consumer_key='my_key_given_from_provider',\n consumer_secret='super_secret',\n launch_url='provider_url',\n params={\n 'lti_message_type': 'basic-lti-launch-request'\n }\n )\n\n return render(\n request,\n 'lti_consumer/index.html',\n {\n 'launch_data': consumer.generate_launch_data(),\n 'launch_url': consumer.launch_url\n }\n )\n\nAt the template:\n\n.. code-block:: html\n\n
\n {% for key, value in launch_data.items %}\n \n {% endfor %}\n \n
\n\n\nTesting\n=======\n\nUnit tests can be run by executing\n\n.. code-block:: sh\n\n tox\n\nThis uses tox_ to set up and run the test environment.\n\n.. _tox: https://tox.readthedocs.org/\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/CaptainAchilles/lti", "keywords": "lti", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "e-lti", "package_url": "https://pypi.org/project/e-lti/", "platform": "", "project_url": "https://pypi.org/project/e-lti/", "project_urls": { "Homepage": "https://github.com/CaptainAchilles/lti" }, "release_url": "https://pypi.org/project/e-lti/0.9.5/", "requires_dist": null, "requires_python": "", "summary": "A python library for building and/or consuming LTI apps. Forked from https://github.com/pylti/lti", "version": "0.9.5" }, "last_serial": 3235465, "releases": { "0.9.3": [ { "comment_text": "", "digests": { "md5": "fcb8c270b587820b7014120eb799a592", "sha256": "ae71dee1e9f5d404f56bc8ef7ab4306b2b79316ac6a7757380885a9c331131cd" }, "downloads": -1, "filename": "e-lti-0.9.3.tar.gz", "has_sig": false, "md5_digest": "fcb8c270b587820b7014120eb799a592", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13674, "upload_time": "2017-10-09T06:27:22", "url": "https://files.pythonhosted.org/packages/77/8d/13cd511be22348e8c94dfc77feb6f928c355b7501e99dcd6b06e29e5c954/e-lti-0.9.3.tar.gz" } ], "0.9.4": [ { "comment_text": "", "digests": { "md5": "bb3ca6050a311d85b8162a9ecf7ab42f", "sha256": "afe959ef3b9ec5bc9987e2c7283aeefcdcae80b4b08f00ef7ae94e6939cbdd43" }, "downloads": -1, "filename": "e-lti-0.9.4.tar.gz", "has_sig": false, "md5_digest": "bb3ca6050a311d85b8162a9ecf7ab42f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13673, "upload_time": "2017-10-09T06:34:56", "url": "https://files.pythonhosted.org/packages/39/7a/0dc1ac91ceb7826fbe89be92545553177b32bd537a2a6a468f81077c722e/e-lti-0.9.4.tar.gz" } ], "0.9.5": [ { "comment_text": "", "digests": { "md5": "25538d0b2ca4b78c9569cdd375fae7c9", "sha256": "c4022d04157cbb62832bf62deed23b93b2b38a9e8789a4c8fafa8d89bb7fba26" }, "downloads": -1, "filename": "e-lti-0.9.5.tar.gz", "has_sig": false, "md5_digest": "25538d0b2ca4b78c9569cdd375fae7c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15423, "upload_time": "2017-10-09T06:42:45", "url": "https://files.pythonhosted.org/packages/fc/32/e8afa15065628f6e2e0fdbd434576fd6c3778cb1b6f175bfa045b6742931/e-lti-0.9.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "25538d0b2ca4b78c9569cdd375fae7c9", "sha256": "c4022d04157cbb62832bf62deed23b93b2b38a9e8789a4c8fafa8d89bb7fba26" }, "downloads": -1, "filename": "e-lti-0.9.5.tar.gz", "has_sig": false, "md5_digest": "25538d0b2ca4b78c9569cdd375fae7c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15423, "upload_time": "2017-10-09T06:42:45", "url": "https://files.pythonhosted.org/packages/fc/32/e8afa15065628f6e2e0fdbd434576fd6c3778cb1b6f175bfa045b6742931/e-lti-0.9.5.tar.gz" } ] }