Maxwell's demon of test enviroment
page/page.py
from j2htmx import Component
class Page(Component):
...
page/i.html
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
</head>
<body id="{{ component }}">
{{ param_text }}
</body>
</html>
main.py
from aiohttp import web
from aiohttp.web_request import Request
from page.page import Page
routes = web.RouteTableDef()
app = web.Application()
async def root_page(request: Request) -> web.Response:
return web.Response(text=await Page().finalize(
param_text='Hi'
), headers={'Content-type': 'text/html; charset=utf-8'})
app.add_routes([
web.get('/', root_page)
])
if __name__ == "__main__":
web.run_app(app)
Metadata
Release files for j2htmx 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| j2htmx-0.1.0.tar.gz | 7.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| j2htmx-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.5 kB
Release files / j2htmx-0.1.0.tar.gz
| Download URL | j2htmx-0.1.0.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72b342ea87645dd99108f51875d2cd2365c969e96fd520f44eb09fe3d90d74ff
|
|
BLAKE2b-256 checksum How to use checksums |
cc068160cc55196eabaec3defed8117b3bf82839f91f360f4788e56d566205c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.13
|
Release files / j2htmx-0.1.0-py3-none-any.whl
| Download URL | j2htmx-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
010c88cdebe091bb0c3806933ef8c8019ae96c01a2586f291b061bdb057762fe
|
|
BLAKE2b-256 checksum How to use checksums |
0e0d8434cdb5128169fb9ca979d0c1bdd0dce1c3e49e2fd0982fa3cfc2faf192
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.13
|