dazzler 0.1.0
pip install dazzler==0.1.0
Newer version available (0.10.0)
Released:
Async Web Framework
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Philippe Duval
- Tags async , web , react , asyncio , aiohttp
Classifiers
- Intended Audience
- License
- Programming Language
Project description
Dazzler
Dazzler is a Python (>=3.6) async web framework. Create dazzling fast pages with a layout of python components and bindings to update from the backend.
Install
Install with pip: $ pip install dazzler
Basic example
Create a page with a layout and assign a binding to set the output component children when clicked on.
from dazzler import Dazzler
from dazzler.system import Page, Trigger, BindingContext
from dazzler.components import core
app = Dazzler(__name__)
page = Page(
'my-page',
core.Container([
core.Html('H2', 'My dazzler page'),
core.Input(identity='input', placeholder='Enter name'),
core.Button('Click me', identity='click-me'),
core.Container(identity='output')
])
)
app.add_page(page)
@page.bind(Trigger('click-me', 'clicks'))
async def on_click(context: BindingContext):
name = await context.get_aspect('input', 'value')
await context.set_aspect(
'output', children=f'Hello {name}'
)
if __name__ == '__main__':
app.start()
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Philippe Duval
- Tags async , web , react , asyncio , aiohttp
Classifiers
- Intended Audience
- License
- Programming Language
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file dazzler-0.1.0.tar.gz
.
File metadata
- Download URL: dazzler-0.1.0.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
f9dc730882b95c55b121e41e50c531d75c9e06b9db95f687ef0724546fd99f4d
|
|
MD5 |
9fb64686fb94a3378aa5ce352252b202
|
|
BLAKE2b-256 |
3e7b76761eec9331c2dcd342c9a08dd3c17cee2a86e3cec0c94c103aa0a2c1e5
|