TGViewer
Питонические атаки Питонические атаки @pythonic_attacks · 1.15K subscribers
Post #253 540

Forwarded from Python Daily

lona-web-org/lona - очень любопытный фреймворк, который позволяет писать веб-приложения полностью на пайтоне. Ни строчки на js впредь! 😁

from lona.html import HTML, Button, Div, H1
from lona import LonaApp, LonaView

app = LonaApp(__file__)

@app.route('/')
class MyView(LonaView):
def handle_request(self, request):
message = Div('Button not clicked')
button = Button('Click me!')

html = HTML(
H1('Click the button!'),
message,
button,
)

self.show(html)

# this call blocks until the button was clicked
input_event = self.await_click(button)

if input_event.node == button:
message.set_text('Button clicked')

return html


app.run(port=8080)


#github #github_explore #nothabr #pydaily
GitHub GitHub - lona-web-org/lona: Write responsive web apps in full python Write responsive web apps in full python. Contribute to lona-web-org/lona development by creating an account on GitHub.
More from @pythonic_attacks
  1. May 24, 2026GPT-5.5 по дефолту предпочитает использовать uv. Совпадение? Абсолютно точно нет. Логично…
  2. Mar 19, 2026Новость вызывает столько противоречивых мыслей, что я даже прерву радио молчание. С одной…
  3. Mar 19, 2026https://openai.com/index/openai-to-acquire-astral/ & https://astral.sh/blog/openai Это не…
  4. Nov 17, 2025Ну что же.. Мы совместно с Эммой Смит опубликовали Pre-PEP о добавлении Раста в CPython. В…
  5. May 19, 2025Вышел трейлер документалки о Python. Что-то на уровне Marvel, возможно даже выше https://w…
  6. May 15, 2025All good things come to an end Что ж, скажем Майкрософту спасибо, что 4 года содержал кома…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →