Live data from Hacker News

Show HN: I built a Python web framework

github.com

101–110 of 127 posts

Re: Show HN: I built a Python web framework

#101

I briefly looked at the code and it seems like the actual server code is just based on third-party modules (e.g. uvicorn.) There's no socket code here and barely any mention of anything related to HTTP in the library. This is more like a wrapper around existing web frameworks than anything new by itself. It seems to provide it's own routing and templating but that's it. I wouldn't call that a web framework.

[deleted]

Re: Show HN: I built a Python web framework

#103
post #82
post #7

I went over the docs and couldn’t find anything about state management and client/server actions. I’m guessing this would be similar to LiveView? If so, I’m not sure Python will handle the concurrency as well as Elixir… Edit: I see now that the goal is to compile this to JS, so I’m assuming it’s going to be quite the opposite of LiveView and will do everything on the client?

This looks like the regular server side web framework with helpers to create html. State is (likely) managed by using the appropriate python library, or just a global variable or dict if race conditions don’t matter.

Then why compile to JS? And what happens when the client performs any actions, e.g clicks a button that should send an outgoing request either from the client or from the server?

Re: Show HN: I built a Python web framework

#104

Wow I like it, simple like Flask, but with the HTML in the same file (as opposed to the jinja templates) which is a pattern I really like! Makes me wonder if you could integrate this ambition to do the web-stuff in your Python file with the FastAPI/Pydantic BaseModel situation. Like a HTML templating library made out of Python data classes (or Pydantic BaseModels). Either way, I respect the ambition! :) Always cool t…

Flask's routes return strings, there's nothing stopping you from doing this. The render_template function is just a convenience.

Re: Show HN: I built a Python web framework

#106
post #27

Earlier quoted context omitted.

Have noticed that teens tend to indeed say they're x old on stuff they're doing.

And he's been working on it for a year. So he built a web framework at 14. And I can't center a div without a google search... (I am a back-end dev tho, so its a little better than it sounds)

Use margin: auto, unless you want to make people mad in which case XHTML just gives you the much more convenient and less semantic

Re: Show HN: I built a Python web framework

#110
post #28
post #14

Earlier quoted context omitted.

Then you've invented Visual Basic in the 90s, WordPress in the 00s and I don't know Squarespace or something in the last decade. For business cases beyond that, this is simply not how "the backend" works.

Visual Basic and other "RAD" builders were pretty neat and I think platforms like WordPress or Drupal never captured their charm. For one, any apps built on them need a rather complex runtime, which feels worse to me than a language's standard library or the JVM. It's a far cry from dragging in a button and then referencing it as a variable in code. Second, the graphical niceties of these platforms often run "in-proc…

> I want to know that some folder full of source code is the program, and some other folder is the data …

That would be completely ordinary with Smalltalk.

"Within each project, a set of changes you make to class descriptions is maintained. … Using a browser view of this set of changes, you can find out what you have been doing. Also, you can use the set of changes to create an external file containing descriptions of the modifications you have made to the system so that you can share your work with other users."

1984 Smalltalk-80 The Interactive Programming Environment page 46

https://rmod-files.lille.inria.fr/FreeBooks/TheInteractivePr...

Post reply on HN