{"id":13695772,"url":"https://github.com/dmitry-viskov/pylti1.3-flask-example","last_synced_at":"2025-05-03T13:33:15.713Z","repository":{"id":43684955,"uuid":"249275520","full_name":"dmitry-viskov/pylti1.3-flask-example","owner":"dmitry-viskov","description":"PyLTI1p3 Flask usage example","archived":false,"fork":false,"pushed_at":"2023-12-21T21:27:05.000Z","size":43,"stargazers_count":20,"open_issues_count":13,"forks_count":29,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-12T23:36:10.080Z","etag":null,"topics":["flask","lti","lti-tool","lti1p3","ltiadvantage","pylti1p3","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmitry-viskov.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-03-22T21:27:18.000Z","updated_at":"2024-10-15T14:11:49.000Z","dependencies_parsed_at":"2024-01-25T19:13:03.702Z","dependency_job_id":null,"html_url":"https://github.com/dmitry-viskov/pylti1.3-flask-example","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/dmitry-viskov%2Fpylti1.3-flask-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitry-viskov%2Fpylti1.3-flask-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitry-viskov%2Fpylti1.3-flask-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitry-viskov%2Fpylti1.3-flask-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmitry-viskov","download_url":"https://codeload.github.com/dmitry-viskov/pylti1.3-flask-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252195924,"owners_count":21709737,"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","lti-tool","lti1p3","ltiadvantage","pylti1p3","python"],"created_at":"2024-08-02T18:00:33.317Z","updated_at":"2025-05-03T13:33:15.229Z","avatar_url":"https://github.com/dmitry-viskov.png","language":"Python","funding_links":[],"categories":["Libraries and Examples"],"sub_categories":["Python"],"readme":"Example of usage PyLTI1p3 library within Flask framework\n==========================================================\n\n`PyLTI1p3`_ is a Python implementation of LTI 1.3 Advantage Tool.\n\n.. _PyLTI1p3: https://github.com/dmitry-viskov/pylti1.3\n\nFirst of all choose and configure test LTI 1.3 Platform. It may be:\n\n* `IMS Global test site`_\n* `Canvas LMS`_ (Detailed `instruction`_ how to setup Canvas as LTI 1.3 Platform is `here`_)\n* `Blackboard Learn`_ (`Documentation`_)\n\n.. _IMS Global test site: https://lti-ri.imsglobal.org\n.. _Canvas LMS: https://github.com/instructure/canvas-lms\n.. _instruction: https://github.com/dmitry-viskov/pylti1.3/wiki/Configure-Canvas-as-LTI-1.3-Platform\n.. _here: https://github.com/dmitry-viskov/pylti1.3/wiki/Configure-Canvas-as-LTI-1.3-Platform\n.. _Blackboard Learn: https://github.com/blackboard\n.. _Documentation: https://docs.blackboard.com/lti/tutorials/py-lti-1p3\n\nThe most simple way to check example is to use ``docker`` + ``docker-compose``.\nChange the necessary configs in the ``configs/game.json`` (`here is instruction`_ how to generate your own public + private keys):\n\n.. _here is instruction: https://github.com/dmitry-viskov/pylti1.3/wiki/How-to-generate-JWT-RS256-key-and-JWKS\n\n.. code-block:: javascript\n\n    {\n        \"\u003cissuer\u003e\" : [{ // This will usually look something like 'http://example.com'\n            \"default\": true, // this block will be used in case if client-id was not passed\n            \"client_id\" : \"\u003cclient_id1\u003e\", // This is the id received in the 'aud' during a launch\n            \"auth_login_url\" : \"\u003cauth_login_url\u003e\", // The platform's OIDC login endpoint\n            \"auth_token_url\" : \"\u003cauth_token_url\u003e\", // The platform's service authorization endpoint\n            \"auth_audience\": null, // The platform's OAuth2 Audience (aud). Is used to get platform's access token,\n                                   // Usually the same as \"auth_token_url\" but in the common case could be a different url\n            \"key_set_url\" : \"\u003ckey_set_url\u003e\", // The platform's JWKS endpoint\n            \"key_set\": null, // in case if platform's JWKS endpoint somehow unavailable you may paste JWKS here\n            \"private_key_file\" : \"\u003cpath_to_private_key\u003e\", // Relative path to the tool's private key\n            \"public_key_file\": \"\u003cpath_to_public_key\u003e\", // Relative path to the tool's public key\n            \"deployment_ids\" : [\"\u003cdeployment_id\u003e\"] // The deployment_id passed by the platform during launch\n        }, {\n            \"default\": false,\n            \"client_id\" : \"\u003cclient_id2\u003e\",\n            ...\n        }]\n    }\n\nand execute:\n\n.. code-block:: shell\n\n    $ docker-compose up --build\n\nYou may use virtualenv instead of docker:\n\n.. code-block:: shell\n\n    $ virtualenv venv\n    $ source venv/bin/activate\n    $ pip install -r requirements.txt\n    $ cd game\n    $ python app.py\n\nYou may also use `Heroku`_ to host this sample. For more information, see this `link`_\n\n.. _Heroku: https://heroku.com\n.. _link: https://docs.blackboard.com/lti/tutorials/py-lti-1p3#using-heroku\n\nNow there is game example tool you can launch into on the port 9001:\n\n.. code-block:: shell\n\n    OIDC Login URL: http://127.0.0.1:9001/login/\n    LTI Launch URL: http://127.0.0.1:9001/launch/\n    JWKS URL: http://127.0.0.1:9001/jwks/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitry-viskov%2Fpylti1.3-flask-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmitry-viskov%2Fpylti1.3-flask-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitry-viskov%2Fpylti1.3-flask-example/lists"}