{"id":13634486,"url":"https://github.com/jupyter/terminado","last_synced_at":"2025-12-11T21:04:25.268Z","repository":{"id":21300967,"uuid":"24617259","full_name":"jupyter/terminado","owner":"jupyter","description":"Terminals served by tornado websockets","archived":false,"fork":false,"pushed_at":"2024-04-30T12:32:56.000Z","size":566,"stargazers_count":371,"open_issues_count":32,"forks_count":94,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-05-13T00:39:25.163Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://terminado.readthedocs.org/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jupyter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.rst","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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-09-29T23:44:25.000Z","updated_at":"2025-05-10T03:01:55.000Z","dependencies_parsed_at":"2023-12-06T00:31:08.909Z","dependency_job_id":"a339ada7-4d30-4312-afc1-042d024db28d","html_url":"https://github.com/jupyter/terminado","commit_stats":{"total_commits":391,"total_committers":50,"mean_commits":7.82,"dds":0.7570332480818415,"last_synced_commit":"c70fc3882cca11bf55d3d42c7fc8217b3a6908da"},"previous_names":["takluyver/terminado"],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jupyter%2Fterminado","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jupyter%2Fterminado/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jupyter%2Fterminado/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jupyter%2Fterminado/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jupyter","download_url":"https://codeload.github.com/jupyter/terminado/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254040183,"owners_count":22004465,"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":[],"created_at":"2024-08-01T23:01:06.144Z","updated_at":"2025-12-11T21:04:19.978Z","avatar_url":"https://github.com/jupyter.png","language":"Python","funding_links":[],"categories":["Others","Third-Party Extensions"],"sub_categories":["WebSockets / Realtime / Interactive"],"readme":"# Terminado\n\n[![Build Status](https://github.com/jupyter/terminado/actions/workflows/test.yml/badge.svg?query=branch%3Amain++)](https://github.com/jupyter/terminado/actions/workflows/test.yml/badge.svg?query=branch%3Amain++)\n[![Documentation Status](https://readthedocs.org/projects/terminado/badge/?version=latest)](http://terminado.readthedocs.io/en/latest/?badge=latest)\n\nThis is a [Tornado](http://tornadoweb.org/) websocket backend for the\n[Xterm.js](https://xtermjs.org/) Javascript terminal emulator library.\n\nIt evolved out of [pyxterm](https://github.com/mitotic/pyxterm), which\nwas part of [GraphTerm](https://github.com/mitotic/graphterm) (as\nlineterm.py), v0.57.0 (2014-07-18), and ultimately derived from the\npublic-domain [Ajaxterm](http://antony.lesuisse.org/software/ajaxterm/)\ncode, v0.11 (2008-11-13) (also on Github as part of\n[QWeb](https://github.com/antonylesuisse/qweb)).\n\nModules:\n\n- `terminado.management`: controls launching virtual terminals,\n  connecting them to Tornado's event loop, and closing them down.\n- `terminado.websocket`: Provides a websocket handler for\n  communicating with a terminal.\n- `terminado.uimodule`: Provides a `Terminal` Tornado [UI\n  Module](http://www.tornadoweb.org/en/stable/guide/templates.html#ui-modules).\n\nJS:\n\n- `terminado/_static/terminado.js`: A lightweight wrapper to set up a\n  term.js terminal with a websocket.\n\nLocal Installation:\n\n\u003e $ pip install -e .\\[test\\]\n\nUsage example:\n\n```python\nimport os.path\nimport tornado.web\nimport tornado.ioloop\n\n# This demo requires tornado_xstatic and XStatic-term.js\nimport tornado_xstatic\n\nimport terminado\n\nSTATIC_DIR = os.path.join(os.path.dirname(terminado.__file__), \"_static\")\n\n\nclass TerminalPageHandler(tornado.web.RequestHandler):\n    def get(self):\n        return self.render(\n            \"termpage.html\",\n            static=self.static_url,\n            xstatic=self.application.settings[\"xstatic_url\"],\n            ws_url_path=\"/websocket\",\n        )\n\n\nif __name__ == \"__main__\":\n    term_manager = terminado.SingleTermManager(shell_command=[\"bash\"])\n    handlers = [\n        (r\"/websocket\", terminado.TermSocket, {\"term_manager\": term_manager}),\n        (r\"/\", TerminalPageHandler),\n        (\n            r\"/xstatic/(.*)\",\n            tornado_xstatic.XStaticFileHandler,\n            {\"allowed_modules\": [\"termjs\"]},\n        ),\n    ]\n    app = tornado.web.Application(\n        handlers,\n        static_path=STATIC_DIR,\n        xstatic_url=tornado_xstatic.url_maker(\"/xstatic/\"),\n    )\n    # Serve at http://localhost:8765/ N.B. Leaving out 'localhost' here will\n    # work, but it will listen on the public network interface as well.\n    # Given what terminado does, that would be rather a security hole.\n    app.listen(8765, \"localhost\")\n    try:\n        tornado.ioloop.IOLoop.instance().start()\n    finally:\n        term_manager.shutdown()\n```\n\nSee the [demos\ndirectory](https://github.com/takluyver/terminado/tree/master/demos) for\nmore examples. This is a simplified version of the `single.py` demo.\n\nRun the unit tests with:\n\n\u003e $ pytest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjupyter%2Fterminado","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjupyter%2Fterminado","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjupyter%2Fterminado/lists"}