{"id":13695746,"url":"https://github.com/mitodl/mit_lti_flask_sample","last_synced_at":"2025-08-18T23:33:25.212Z","repository":{"id":22986915,"uuid":"26337271","full_name":"mitodl/mit_lti_flask_sample","owner":"mitodl","description":"a sample LTI provider using the PyLTI library and the Flask framework","archived":false,"fork":false,"pushed_at":"2024-03-07T18:23:53.000Z","size":125,"stargazers_count":23,"open_issues_count":15,"forks_count":44,"subscribers_count":32,"default_branch":"master","last_synced_at":"2024-11-12T23:36:09.239Z","etag":null,"topics":["flask","lti-provider","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitodl.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-11-07T20:48:00.000Z","updated_at":"2024-07-23T15:20:50.000Z","dependencies_parsed_at":"2024-11-12T23:31:15.994Z","dependency_job_id":"261ec1d3-97ee-4c16-8b6a-d63fc4add8fd","html_url":"https://github.com/mitodl/mit_lti_flask_sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitodl%2Fmit_lti_flask_sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitodl%2Fmit_lti_flask_sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitodl%2Fmit_lti_flask_sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitodl%2Fmit_lti_flask_sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitodl","download_url":"https://codeload.github.com/mitodl/mit_lti_flask_sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230292713,"owners_count":18203650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","lti-provider","python"],"created_at":"2024-08-02T18:00:33.021Z","updated_at":"2024-12-18T15:15:59.887Z","avatar_url":"https://github.com/mitodl.png","language":"Python","funding_links":[],"categories":["Libraries and Examples"],"sub_categories":["Python"],"readme":"Sample LTI Provider for Flask\n=============================\n|Deploy|\n\n.. |Deploy| image:: https://www.herokucdn.com/deploy/button.png\n   :target: https://heroku.com/deploy\n\nThis is a sample LTI provider for the Flask framework [#f1]_.  It is a minimal\nimplementation that provides a starting point for a custom LTI provider.\nIt is one of a series of LTI providers written for popular frameworks and\nusing the Python LTI library, PyLTI.  Additional sample LTI providers for\nother Python frameworks are planned.  Check for them on the PyLTI Github site,\n`https://github.com/mitodl/pylti\n\u003chttps://github.com/mitodl/pylti\u003e`_.  While these LTI provider examples can\nbe used with any LTI consumer, they were created for use with edX.  Integrating\nan LTI provider with edX is described in the edX LTI `docs.\n\u003chttp://edx.readthedocs.org/projects/edx-partner-course-staff/en/latest/exercises_tools/lti_component.html\u003e`_\n\nYou will need both this app and the PyLTI library to create your own LTI\nprovider.  Each sample contains only the code variations necessary to support\nits specific framework.  By creating an interface boundary between a sample\nprovider and PyLTI, PyLTI manages the specific LTI features and each sample\nmanages the specific requirements of its framework.  You can easily switch your\ncustom provider from one framework to another.\n\nIf you have questions or problems, please create an issue on the\nproject's GitHub site,\n`https://github.com/mitodl/mit_lti_flask_sample/issues\n\u003chttps://github.com/mitodl/mit_lti_flask_sample/issues\u003e`_\n\nPlease see the PyLTI README `https://github.com/mitodl/pylti\n\u003chttps://github.com/mitodl/pylti\u003e`_ for a detailed description of the architecture.\n\nSuper Quick Start\n-----------------\n\nYou can try out the sample app for free by deploying it to your Heroku account\nsimply by clicking the deploy button:\n\n|Deploy|\n\n.. |Deploy| image:: https://www.herokucdn.com/deploy/button.png\n   :target: https://heroku.com/deploy\n\nAfter deployment is complete you can customize the app from the Heroku\ngit repository that is created.  This button will also work in forked\nrepositories with your own modifications.\n\nQuick Start\n-----------\n\nOpen your terminal and navigate to the directory you want to contain your\nworking directory.  Execute these commands:\n\n.. code-block:: bash\n\n   git clone git@github.com:mitodl/mit_lti_flask_sample.git\n   cd mit_lti_flask_sample\n   pip install -r requirements.txt\n   python mit-lti-flask-sample.py\n\nThen navigate to `http://localhost:5000/is_up \u003chttp://localhost:5000/is_up\u003e`_\n\nIf you see a page containing the words, \"I'm up\", you have verified that you\ncan run the sample app locally.\n\n1. Deploy the sample app to a server accessible from your LTI consumer, edX or\n   another LMS.  (These instructions presume you're using edX, but they are\n   similar for any LTI consumer.)\n#. In edX Studio, navigate to ``Settings\\Advanced Settings`` and enter these\n   values for the specified keys.\n\n======================= ========================\nKeys                    Values\n======================= ========================\nAdvanced Module List    ``[ lti ]``\n----------------------- ------------------------\nLTI Passports           ``[ \"lti_starx_add_demo:__consumer_key__:__lti_secret__\" ]``\n======================= ========================\n\n3. Still in edX Studio, navigate to the content page that will contain your LTI\n   tool and create an LTI Advanced Component.\n#. Enter the LTI ID for the external LTI provider.\n#. Enter the URL of the external tool that this component launches.\n\n======================= ========================\nKeys                    Values\n======================= ========================\nLTI ID                  ``lti_starx_add_demo``\n----------------------- ------------------------\nLTI URL                 ``THE_URL_OF_YOUR_DEPLOYED_LTI_PROVIDER``\n======================= ========================\n\n.. [#f1] From their website, *\"Flask is a microframework for Python based on\n   Werkzeug, Jinja 2 and good intentions.\"* `http://flask.pocoo.org/ \u003chttp://flask.pocoo.org/\u003e`_\n\nThere is more comprehensive documentation of these settings at\n`http://edx-partner-course-staff.readthedocs.org/en/latest/exercises_tools/lti_component.html\n\u003chttp://edx-partner-course-staff.readthedocs.org/en/latest/exercises_tools/lti_component.html\u003e`_\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitodl%2Fmit_lti_flask_sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitodl%2Fmit_lti_flask_sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitodl%2Fmit_lti_flask_sample/lists"}