{"id":27439641,"url":"https://github.com/subsetpark/logl","last_synced_at":"2025-04-14T22:00:05.552Z","repository":{"id":14294666,"uuid":"17003102","full_name":"subsetpark/logl","owner":"subsetpark","description":"a toy web framework for educational purposes.","archived":false,"fork":false,"pushed_at":"2014-04-16T13:40:59.000Z","size":255,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T13:49:54.436Z","etag":null,"topics":[],"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/subsetpark.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2014-02-19T23:37:37.000Z","updated_at":"2018-07-03T02:41:00.000Z","dependencies_parsed_at":"2022-09-11T03:00:25.352Z","dependency_job_id":null,"html_url":"https://github.com/subsetpark/logl","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/subsetpark%2Flogl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subsetpark%2Flogl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subsetpark%2Flogl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subsetpark%2Flogl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/subsetpark","download_url":"https://codeload.github.com/subsetpark/logl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248968749,"owners_count":21191158,"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":"2025-04-14T22:00:05.056Z","updated_at":"2025-04-14T22:00:05.533Z","avatar_url":"https://github.com/subsetpark.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"logl (לאָגל)\n======\n\nLogl is a framework modelled on the well-known framework for Python, [Flask][]. It is a WSGI application that implements much of what you'd expect from a simple framework:\n\n- routes\n- db access\n- html templating\n- GET and POST parsing\n\n[flask]: flask.pocoo.org\n\n## Usage\n\nTo build a web application with logl, simply start a new project and import the logl module. Logl has a structure very similar to Flask. At the top of your application you should instantiate a new application object:\n\n```python\nfrom logl import Logl, Response\n\napp = Logl()\n```\n\nThis application will be your main point of interaction for your web app. Then proceed to define functions for the endpoints of your app, using a decorator to denote the url.\n\n```python\n@app.add_route('/')\ndef index():\n    \"\"\"\n    Display the requested path.\n    \"\"\"\n    app.add_replace('query', app.request.query)\n    response = app.response(template=\"index.html\")\n    return response\n```\n\nIn the above example, we are also passing a variable to the application's \"context\", which is where it stores data for the templating engine to access.\n\n```\n{{extends base.html}}\n{{block name}}\nIf page\n{{endblock}}\n{{block content}}\n\u003ch2\u003eThis page demonstrates conditionals.\u003c/h2\u003e\n\u003cform method=\"post\" action=\"/if\"\u003e\n    \u003cp\u003e\n        \u003cinput type=\"checkbox\" name=\"ifs\" value=\"first\"\u003e\n        \u003cinput type=\"checkbox\" name=\"ifs\" value=\"second\"\u003e\n        \u003cinput type=\"submit\" value=\"Submit\"\u003e\n    \u003c/p\u003e\n\u003c/form\u003e\n\u003cp\u003e\n{{if first}}\nThis is a basic if.\n{{endif}}\n{{if second}}\nThis is an if with an else.\n{{else}}\nThis is an else.\n{{endif}}\n{{endblock}}\n```\n\nLogl's templating engine supports basic jinja-style features including conditionals, block extension, and variable substitution.\n\n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubsetpark%2Flogl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubsetpark%2Flogl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubsetpark%2Flogl/lists"}