{"id":13737392,"url":"https://github.com/lona-web-org/lona","last_synced_at":"2025-05-14T20:04:12.187Z","repository":{"id":37083514,"uuid":"289196178","full_name":"lona-web-org/lona","owner":"lona-web-org","description":"Write responsive web apps in full python","archived":false,"fork":false,"pushed_at":"2024-12-31T02:51:37.000Z","size":14878,"stargazers_count":532,"open_issues_count":14,"forks_count":26,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-18T22:37:31.425Z","etag":null,"topics":["framework","hacktoberfest","python3","web"],"latest_commit_sha":null,"homepage":"","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/lona-web-org.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2020-08-21T06:33:50.000Z","updated_at":"2025-03-24T03:53:24.000Z","dependencies_parsed_at":"2022-08-02T22:01:07.272Z","dependency_job_id":"70893661-fa5d-4f43-b192-bcfa9970156e","html_url":"https://github.com/lona-web-org/lona","commit_stats":{"total_commits":1286,"total_committers":20,"mean_commits":64.3,"dds":0.3701399688958009,"last_synced_commit":"281977fe4151c8c2afbb521e6bd811897f326c14"},"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lona-web-org%2Flona","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lona-web-org%2Flona/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lona-web-org%2Flona/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lona-web-org%2Flona/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lona-web-org","download_url":"https://codeload.github.com/lona-web-org/lona/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249794443,"owners_count":21326714,"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":["framework","hacktoberfest","python3","web"],"created_at":"2024-08-03T03:01:46.183Z","updated_at":"2025-04-19T20:29:21.920Z","avatar_url":"https://github.com/lona-web-org.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":".. image:: doc/content/logo.svg\n    :alt: Lona logo\n    :height: 200px\n    :width: 200px\n.. image:: https://img.shields.io/pypi/l/lona.svg\n    :alt: license MIT\n    :target: https://pypi.org/project/lona\n.. image:: https://img.shields.io/pypi/pyversions/lona.svg\n    :alt: python 3\n    :target: https://pypi.org/project/lona\n.. image:: https://img.shields.io/pypi/v/lona.svg\n    :alt: latest version\n    :target: https://pypi.org/project/lona\n.. image:: https://github.com/lona-web-org/lona/actions/workflows/ci.yml/badge.svg\n    :alt: ci status\n    :target: https://github.com/lona-web-org/lona/actions/workflows/ci.yml\n.. image:: https://img.shields.io/codecov/c/github/lona-web-org/lona.svg\n    :alt: code coverage\n    :target: https://codecov.io/gh/lona-web-org/lona/\n\n\nLona is a web application framework, designed to write responsive web apps in\n**full** Python.\n\n**Demos:** `lona-web.org/demos \u003chttps://lona-web.org/demos/index.html\u003e`_\n\n**FAQ:** `lona-web.org/faq \u003chttp://lona-web.org/faq.html\u003e`_\n\n**Documentation:** `lona-web.org \u003chttp://lona-web.org\u003e`_\n\n**Changelog:** `lona-web.org/changelog \u003chttp://lona-web.org/changelog.html\u003e`_\n\n**Reddit:** `reddit.com/r/lona_web_org/ \u003chttps://www.reddit.com/r/lona_web_org/\u003e`_\n\n**Discord:** `discord.com/lona-web.org \u003chttps://discord.gg/WBf5PVACsj\u003e`_\n\nWeb is a solved problem in Python since ages, but traditionally Python handles\nonly the server side. If you want to have client side interaction like\nclick events or you want update content live, you have to write an additional\nJavascript application.\n\nLona handles the server side and the client side, and provides a simple,\npythonic API to write self contained views.\n\n.. code-block:: text\n\n    # pip install lona\n\n.. code-block:: python\n\n    from lona.html import HTML, Button, Div, H1\n    from lona import LonaApp, LonaView\n\n    app = LonaApp(__file__)\n\n\n    @app.route('/')\n    class MyView(LonaView):\n        def handle_button_click(self, input_event):\n            self.message.set_text('Button clicked')\n\n        def handle_request(self, request):\n            self.message = Div('Button not clicked')\n\n            html = HTML(\n                H1('Click the button!'),\n                self.message,\n                Button('Click me!', handle_click=self.handle_button_click),\n            )\n\n            return html\n\n\n    if __name__ == '__main__':\n        app.run(port=8080, live_reload=True)\n\n**More information:**\n`Getting Started \u003chttp://lona-web.org/tutorial/01-getting-started/index.html\u003e`_\n\n\nHow does it work?\n-----------------\n\nLona comes with a Javascript based browser library that speaks a specialized\nprotocol with the backend.\nThis protocol specifies messages like \"hey frontend, please show $HTML\" and\n\"hey backend, someone clicked on node XY\".\n\n**More information:**\n`Basic Concept \u003chttps://lona-web.org/basic-concept.html\u003e`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flona-web-org%2Flona","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flona-web-org%2Flona","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flona-web-org%2Flona/lists"}