How difficult is it to add authentication in this framework? How many lines of code? How secure? None of the python->web projects have this.
Rio: Web apps in pure Python
181–190 of 205 posts
Re: Rio: Web apps in pure Python
#182I'm excited to see more projects like Rio exploring the full-stack python web dev space. There are definitely categories of users for which the approach makes sense. --- For me personally -- and I'm guessing for a bunch of other HNers -- writing full-stack web apps strictly in python is a non-goal. I've settled on a comfortable (for me) stack for smaller projects that need python on the backend that combines: 1. Lite…
Hopefully JSX can be more mainstream, that is, I can use it directly in js/html/css projects without all the extra tools pre-installed and pre-configured, making jsx part of the 'vanilla' development will be really nice(no react, no vuejs etc).
Re: Rio: Web apps in pure Python
#183Earlier quoted context omitted.
Unlike Htpy, this one has callbacks and state in Python.
Storing state in-memory is usually not a good idea for web apps, most use databases with persistence. I got curious and found the example code for implementing password-based authentication on SQLite. I don't think it's very compelling when the alternatives include Django. https://github.com/rio-labs/rio/blob/41a6bb828c2e20eb7fdc5c6...
Re: Rio: Web apps in pure Python
#184While I'm not certain if the world needs more Javascript, I am certain it does not need more Python.
That's overly harsh IMO. Python is not perfect—no language is—but it arguably has the lowest barrier to entry for new programmers, with far fewer "wats" than languages of its kind and era (certainly less than JS). Sure, its reference implementation is not the most performant, but it easily interoperates with C/C++, and alternative implementations like PyPy are also relatively easy to switch to, so it can be performan…
Ecosystem is great - and probably the greatest thing Python has to offer after the aforementioned low barrier to entry. No language comes close if one wants to get up & going and try out AI/ML - whether using an API or using some packages to make models of one's own - it has everything one can ever need.
Re: Rio: Web apps in pure Python
#185Re: Rio: Web apps in pure Python
#186Re: Rio: Web apps in pure Python
#187Re: Rio: Web apps in pure Python
#188Earlier quoted context omitted.
But what if I want to use lambdas for more things? Imperative programming only gets you so far. Maybe this is a sign that people are using Python for grander things than it was designed for?
I feel like there is something missing here. What's stopping you from using a normal def? Aside from the definition itself not being usable inline, there is nothing lambda does that def doesn't. And if you really want a definition close to the calling site, just define it there and then put the name where you want to pass it. At the end of the day though there's really nothing to prevent you from creating janky code.…
Being unable to position it inline is the problem.
You might not see the benefit, but many do. It prevents Python from being a good functional programming, for one thing.
Re: Rio: Web apps in pure Python
#189Earlier quoted context omitted.
Hopefully JSX can be more mainstream, that is, I can use it directly in js/html/css projects without all the extra tools pre-installed and pre-configured, making jsx part of the 'vanilla' development will be really nice(no react, no vuejs etc).
I agree about the JSX part - but the thing about real dev is that you have to use all the tools you can, so you don't have to reinvent the wheel. Nobody's still making Windows-only GUI apps using the Win32 API - it's easier and all, but there's so much stuff you have to code yourself that it's simpler to learn a GUI library/framework and Just Use That. I had a quick glance at HTMX - and it seems to just be going back…
Re: Rio: Web apps in pure Python
#190Earlier quoted context omitted.
elixir's liveview is perhaps the best known and arguably inspired a lot of the ones in other languages
yes but doesn't that expect view code that looks a lot like HTML and is usually styled with Tailwind?