{"id":26572264,"url":"https://github.com/odya-llc/flask_html","last_synced_at":"2025-07-04T13:04:41.279Z","repository":{"id":62926371,"uuid":"563344893","full_name":"Odya-LLC/flask_html","owner":"Odya-LLC","description":"HTML generator for Flask applications. Make your HTML code more readable and easier to maintain.","archived":false,"fork":false,"pushed_at":"2024-02-27T08:21:11.000Z","size":27,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-18T06:41:51.921Z","etag":null,"topics":["builder","css","css3","flask","html","html5","js","odya","python","uzbekistan"],"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/Odya-LLC.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":["https://payme.uz/610ca6c33632e1ceb8b8fc44","https://my.qiwi.com/Mykhayl-YmROUXMQWY"]}},"created_at":"2022-11-08T12:25:14.000Z","updated_at":"2024-01-15T16:03:16.000Z","dependencies_parsed_at":"2025-06-18T06:43:47.679Z","dependency_job_id":null,"html_url":"https://github.com/Odya-LLC/flask_html","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Odya-LLC/flask_html","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Odya-LLC%2Fflask_html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Odya-LLC%2Fflask_html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Odya-LLC%2Fflask_html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Odya-LLC%2Fflask_html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Odya-LLC","download_url":"https://codeload.github.com/Odya-LLC/flask_html/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Odya-LLC%2Fflask_html/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263548463,"owners_count":23478765,"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":["builder","css","css3","flask","html","html5","js","odya","python","uzbekistan"],"created_at":"2025-03-23T00:28:24.571Z","updated_at":"2025-07-04T13:04:41.255Z","avatar_url":"https://github.com/Odya-LLC.png","language":"Python","funding_links":["https://payme.uz/610ca6c33632e1ceb8b8fc44","https://my.qiwi.com/Mykhayl-YmROUXMQWY"],"categories":[],"sub_categories":[],"readme":"# Flask-HTML\n![Flask](https://img.shields.io/static/v1?label=under\u0026message=Development\u0026color=yellow\u0026logo=flask)\n![GitHub top language](https://img.shields.io/github/languages/top/Odya-LLC/flask_html)\n![LICENCE](https://img.shields.io/github/license/Odya-LLC/flask_html)\n![Odya](https://img.shields.io/static/v1?label=Developed_by\u0026message=Odya\u0026color=green\u0026logo=python)\n\n\n\nHTML generator for Flask applications. Make your HTML code more readable and easier to maintain.\n## Installation\n```bash\npip install flask_html\n```\n\n## Usage\n\n### Simple HTML\n\n```python\nfrom flask_html import Page, Head\nfrom flask_html.core import Style\nfrom flask_html.tags import Body, Div, P\nfrom flask import request\n@app.route('/')\ndef index():\n    head = Head('Title', ['link to css'],['link to js'], [{\"meta_property\": \"value\"}])\n    page = Page(head)\n    body = Body(page, styles=Style(color=\"red\", padding_top=\"15px\"),classes=['class1', 'class2'], id='body_id',elements=[\n        Div(styles=Style(margin=\"10px\"), classes=['class1', 'class2'], id='div_id', elements=[\n            P(styles=Style(color=\"blue\"), classes=['class1', 'class2'], id='p_id', elements=[\n                \"Hello World\"\n            ])\n        ])\n    ])\n    return page.render(body, request)\n```\n\n### Using with listeners\n\nNote: Jquery automatically injected\n\n```python\nopts = [Option('{}'.format(x),'Name {}'.format(x)) for x in range(10)]\nsel = Select(opts).on('change', 'let val = $(this).val(); alert(val)')\npage = Page(Head('Title', ['link to css'],['link to js'], [{\"meta_property\": \"value\"}]))\nbody = Body(page, elements=[\n    sel\n])\nreturn page.render(body, request)\n```\n\n## Elements\n\n### Example of Div elements\n```python\n\"\"\"Div HTML element\n\nArgs:\n    styles (Style, optional): Inline css styles. Defaults to None.\n    classes (List[str], optional): List of class names. Defaults to [].\n    id (str, optional): Unique ID. Defaults to None.\n    elements (List[object], optional): List of child elements. Defaults to [].\n    props (Dict[str, str], optional): Additional tag properties. Defaults to {}.\n\"\"\"\nDiv(styles=None, classes=[], id=None, elements=[], props={})\n```\n## To Do\n\n - [x] All HTML tags\n - [x] Inline CSS\n - [x] Classes\n - [x] ID\n - [x] Child elements\n - [x] Additional tag properties\n - [x] JS\n - [x] Meta tags\n - [x] Link tags\n - [x] Title\n - [x] Head\n - [x] Body\n - [x] Page\n - [x] Element event listeners\n - [ ] DOM manipulation\n - [ ] Converting js function to python functions\n - [ ] More examples\n\n## Contibuting\n\nThis package open to contributing. Fork, make changes and open pull request\n\n## License\nThis project is licensed under the MIT License (see the `LICENSE` file for details).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodya-llc%2Fflask_html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fodya-llc%2Fflask_html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodya-llc%2Fflask_html/lists"}