Ancestors

Toot

Written by Ken Kinder :clubtwit: on 2024-05-23 at 23:03

@brianokken @mkennedy

I listened to one of your shows recently and you mentioned you were wanting a PyScript frontend framework. I’ve been kind of working on one, and I don’t think it’s really “ready” yet, but since there’s perhaps immediate interest, I thought I’d ask your opinion on what I’ve been doing here:

https://github.com/kkinder/puepy

(1/2)

=> More informations about this toot | More toots from bouncing@twit.social

Descendants

Written by Ken Kinder :clubtwit: on 2024-05-23 at 23:03

I just now made the repo public and threw together a readme file, though if you download it and run the ./serve_examples.py file, you’ll see what I’ve been working on in better detail than the readme.

Would love some feedback. If you want to discuss it more, I’d be eager to. ☕️

Agree with you on the PyCon masks thing, BTW. (2/2)

=> More informations about this toot | More toots from bouncing@twit.social

Written by Michael Kennedy on 2024-05-24 at 02:53

@bouncing @brianokken This is excellent! I’d love to talk about it in a couple of weeks (have some travel and project deadlines in the short-term).

Is there a way to define the UI in HTML and have the bind/event/etc powered by puepy?

=> More informations about this toot | More toots from mkennedy@fosstodon.org

Written by Ken Kinder :clubtwit: on 2024-05-24 at 08:01

@mkennedy @brianokken Thanks!

I did prototype out an earlier version with jinja2. The main problem with that was that jinja2 is just never going to work inside MicroPython. CPython+jinja2 is 20MB+ just for Hello World, which would be kind of rough.

I also struggled to get reactivity working exactly how you’d want with an html string as opposed to a constructed DOM tree, though I imagine it’s something that could be sorted out, ultimately.

=> More informations about this toot | More toots from bouncing@twit.social

Written by Michael Kennedy on 2024-05-24 at 16:15

@bouncing @brianokken Interesting problem. Yes, 20mb with jinja + cpython would be a total deal killer.

Have you looked at uTemplate which Miguel Grinberg is using for his microtdot web framework on micropython?

https://blog.miguelgrinberg.com/post/microdot-yet-another-python-web-framework

=> More informations about this toot | More toots from mkennedy@fosstodon.org

Written by Ken Kinder :clubtwit: on 2024-05-24 at 17:18

@mkennedy @brianokken I tried it but also bumped into problems with it. I’ll see what he did to get it working though. I hadn’t seen microtdot either — thanks for the recommendation!

Is your estimation that some kind of html template language is preferable to the context manager way? I do like the brevity of the context manager — indentation for structure, etc.

=> More informations about this toot | More toots from bouncing@twit.social

Written by Ken Kinder :clubtwit: on 2024-05-26 at 17:27

@mkennedy @brianokken Just looking at utemplate again (here? https://github.com/pfalcon/utemplate/tree/master), at least three issues for me:

(1) The loader, include, etc features need os access; I could monkey-hack that to work with something web-based, though.

(2) The compiled templates don’t seem to work correctly. That I can probably sort out, but the lack of tests make me not sure how it’s supposed to work.

(3) There doesn’t seem to be any html escaping, which is also rough. (1/2)

=> More informations about this toot | More toots from bouncing@twit.social

Written by Ken Kinder :clubtwit: on 2024-05-26 at 17:27

I guess I sort of concluded it was in too rough shape? It was a few months ago I last looked. (2/2)

=> More informations about this toot | More toots from bouncing@twit.social

Written by Michael Kennedy on 2024-05-26 at 21:37

@bouncing @brianokken Thanks for the extra info. Maybe I should reach out to the project and encourage them. :)

=> More informations about this toot | More toots from mkennedy@fosstodon.org

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/112492899592761190
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
325.355535 milliseconds
Gemini-to-HTML Time
1.509037 milliseconds

This content has been proxied by September (ba2dc).