> Note that all examples are deliberately left unstyled to present the simplest implementation.
I've looked at too many documentation examples that show a bunch of things at once, with unrelated tech, making it hard to understand the current point.
This is kind cool. Closer than the Reflex thing to what I think would be cool. I wonder if anybody has made any kind of Python/Django system that lets you just write the front-end stuff in React but handles all the state synchronization stuff between React and your Python server.
Why wouldn't it say nowhere (README, the website) what does it actually do and how? It's all marketing bullshit such as: Get up and running in seconds! Build web apps in minutes. Deploy with a single command. Build anything, faster. Create your whole app in a single language. Don't worry about writing APIs to connect your frontend and backend.
This kind of shit might catch a manager's eye, not a developer's one.
That answers the "what does it actually do" part, but not the "how".
Github and hackernews are both places where developers exchange ideas, so it helps if you explain which tech you build on and what challenges you faced.
Dude its pretty clear what it does just from scrolling down the readme. “Its just like php” if that helps you, but you can also write frontend state management and dynamic behavior right there in the “template”, all in Python.
that doesn't help. I looked at the modules it makes use of and the first one is "openai" (Edit: whoops, it's in their example, not in their requirements. disregard).
php didn't use openai IIRC
i kind of cannot imagine what this would use openai for unless it's using it to write a web application for you. which is pretty ...not like php.
To be fair I don't think Reflex does use openAI, that's just the code example they used.
I think its a decent example project, its easily readable and you can understand what they're doing, but I think as a general rule its better to do something without external unrelated libs. An AI image generator just seems a bit too specific of an example for something that fundamentally has nothing to do with AI.
Worth noting is that this framework has telemetry [1] enabled by default [2] which gathers and sends off various information about your system unless you explicitly disable it.
Opt-out telemetry in companies based on open source projects has become a critical component of YC applications, VC pitches, and acquisition pitches. If it was opt-in of course nobody would turn it on. It's shady but I also somewhat understand the founders who are doing product-led growth by giving out the product on GitHub/PyPI, yet still need some usage metrics to quantify the stickiness to their backers. Pip installs and git clones/forks are only a loose indicator of real usage.
if it's a paid product and it's part of an agreement for support then sure, but for a free product? when you know some high percentage of users are never going to even know that the option to opt out exists?
Seriously tho, when one sees the first word of a Python project with the description "Performant", or a project put Out There by someone with a handle not linked to a bio (even a fake bio)...
Anyway, software regs ARE coming because The Way of software developers has not been obscured from public view for some time now and the (relatively) recent ransomware of municipalities and hospitals resulting in deaths along with serious tensions among global powers have made it a priority. How ironic is it that Microsoft is best positioned to play the gatekeeper role? https://noguiltlife.com/wp-content/uploads/2023/01/scie-fi-m...
It's amazing how even open source software is becoming tainted by surveillance. We can no longer assume that code written by our peers will be free of such nonsense.
It sends the information to a remote server, so your IP is obviously shared as well. It also sends a "project_hash" as "distinct_id" which sounds like a unique tracking ID to me.
My only wish for this is that it didn't just cobble a bunch of existing web stuff together behind the scenes and put an python interface + code generator on it.
Installing all the python deps (250mb), and node_modules (500mb) , plus a package size of 3mb of js isn't a great look.
Yeah I see your point it's definitely something we are going to try and reduce in the future. We wanted to give the users the ability to wrap external react components and leverage that ecosystem so there were trade off we had to make.
The 3MB of JS is in dev mode or prod mode? (Is this similar to the other comment where they were running in dev mode but when they ran in prod it was much smaller ~ 340KB?)
I have built three quick sites with Reflex and it is fantastic for a systems programmer like myself who has no interest in learning Javascript. The recent addition of supporting Tailwind CSS works well and makes it very easy for me to make not terrible looking frontends. Their discord is very helpful for questions and issues that I have raised on their GitHub are responded to quickly.
Interesting how the reception seem to be different this time around compared to when they were called Pynecone. At least that is my recollection. I follow this project with interest, I don't understand all that "you shouldn't do x with y". Each to their own requirements, its great to have a choice.
Yeah HN loved Pynecone! [x] I wonder if the new name is landing poorly or tides are turning against this 'everything in Python' space. Or the "Launch HN" tag encourages positive feedback.
A lot of diagnostic in this discussion so far misses how approachably straightforward the DSL (patterned Python) is.
I'd go so far as to say the patterns are so clean they're almost self-evident, which is remarkable lift for beginners or busy people just mocking up something functional.
As as a meta comment the dynamics and interplay of language adoption and language evolution is quite fascinating. For whatever reason, a lot of people have learned Python in recent times. Whether the hype is data science, machine learning or AI, the number of users creates its own reality.
So now you have some serious talent looking at the pain points people express about the platform, because ofcourse you want to keep the "devlopers, devlopers, devlopers" happy.
Personally I dont see the attraction of an all python approach to the web. The event driven nature of client side programming has no particular affinity with Python. While JS is clearly a monopoly, it doesnt strike as we are paying a huge price for the lack of alternatives. Maybe its just my lack of imagination. If people complain about JS frameworks is because of the choices and designs and burdens these imply, not the fact they are JS.
The area where an all-Python approach would be a radical new take that opens entirely new horizons is actually not the web, but mobile apps.
Mobile is blocked by Google and Apple, that's all. You can't fix that.
What you can fix, though, is an ecosystem built on a pile of left-pad-quality hacks that change every other week. Hence the various attempts to jailbreak the accidental monopoly JS was born with.
Unfortunately, this project doesn't even try to do that, and still relies on that pile of hacks. As such, it's never going to be particularly popular - why suffer most of the JS-ecosystem pain plus the additional pain brought by a transpiler?
Hey, you know the most popular programming language in the world? They don't have a way to write web applications. If you fund us, we'll build a tool for that, tap into a huge TAM and make bank.
Sounds like a pitch that would make VCs start falling over eachother
Vercel is synonymous with Next.js and JavaScript, not Python. Flask and Django also don't have full integration with React like Next.js (Because it's all JS) and Reflex (Feature of the framework) do.
The value prop is very clear to me. Next.js is extremely popular for good reason, I see a lot of value in bringing that to the Python ecosystem as well, especially with all the Python ML SDKs.
Depends on who, I've seen an aquihire for around 7 engs with pedigree go for around 30 million. Now that company had taken on around 20m in VC and had developed a product... but that product was immediately thrown away by the acquiring company and the devs assigned to existing work.
I'm following Pynecone (now Reflex) from the start and liked the idea of building out an AST with Python and compiling that to a working web app (we're actually doing the same with https://wasp-lang.dev/, only it's a DSL and an explicit compiler with JS interop).
My major complain here is that, as far as being a web framework there is precious little information here about the framework. How does this framework scale with multiple requests? What concurrency strategy is it using (threads, processes, actors, etc?). Is this opinionated (it doesn't seem so but it also doesn't say it isn't either). How does this work with popular libraries x,y,z. The full docs have a little bit more information, but not a ton. But mostly there are some cute toy examples and "built in python" and thats about it.
Lets compare this with for example play https://www.playframework.com/ I know from this that it built on Akka, its stateless, aims for predictable resource consumption, has non-blocking io, etc. There is a ton of really important information on what does this web framework actually do that is really important when you are making a choice of a framework.
I have no idea how good this framework is, but besides a few toy examples, I can't see anything that makes me thing "wow this is great I need to use this". Using python to generate front end attributes isn't new, most any web framework can do this also.
This isn't a web framework, it's something to get you up and running ASAP. It's probably not worth it for anything other than utility/one-off, but there's nothing wrong with that.
No offense, but the play framework docs are objectively worse, it feels very "enterprisey" and too many clicks (the "Hello World Tutorial" spans 3 pages)
I don't really understand how "stateless" fits in here. As in it's HTTP-based? As in it doesn't need a database behind it? What does stateless mean in this case?
In general, I think the readme's not bad. I think the example is eye-catching, and I can imagine this would be really nice to make a prototype with. Whether or not it would scale well etc, yes, it would be good to have some of that detail. But I can see a really good use for it already.
stateless in web frameworks means that requests don't alter state of the code for a user. If you look at say JSP with traditional Spring, it tracks the state of each user on the website, which page they are on, which flags they have, etc.
We do use nextjs but I think what's the most handy part of Reflex is the simplification of state management and event handling so there is more complexity to the framework.
I was hoping there is some technical explanation how the compilation step works (especially what do they do to event handlers) but their documentation is very light on details.
Their github repo README has the following:
> Performant ...
Do we have benchmarks for this? More generally speaking, I don't see more technical differentiation besides it being a Python DSL. Nor do they provide numbers to back it up.
We have 5 badges in total, and 1 of them to points to our integrations test passing. And the integration test do serve an important purpose in making sure we are compatible on multiple different os and don't make a change that would break WSL for example. More info here https://github.com/reflex-dev/reflex/tree/main/.github/workf...
The others are the current latest version, python version we support, how many people are on our discord (A metric to see community activity), and a badge that points to our docs. I think all of these are important but open to suggestions on ones you think would serve a better purpose.
Can you be more specific in your criticism wrt disabled people? It's a lot easier for someone to receive feedback when it's specific, especially when discussing something like a README. It can be helpful to others reading who are on the fence about badges and their ilk, too.
What, specifically, is the issue with the badges concerning accessibility? Most badges I see can be reduced to a div containing two spans and some text, which should be usable with a screen reader. Is there missing alt text, aria attributes, etc?
Re: tests, it comes down to developer culture. It may be acceptable for experimental or alpha/beta versions to not pass tests, live on a separate branch, etc. Distros should be live-testing any packages they ship, too; upstream releases aren't guaranteed to be tested, depending on the upstream you're working with. It's nice to know that the latest commit is actually working without having to double check CI locally. However, tests also aren't created equally. The project author(s) could be learning how to refine their tests, and not actually trust the CI's results (yet).
Can we argue that's sloppy, or that they should've never done that before merging and pushing? Sure. Not sure where it gets us. Actionable feedback and cautionary advice is useful, though.
I've used Anvil [0] quite often in the past years for what seems to be a similar purpose (not affiliated, just a happy customer). Does someone know how Reflex compares?
sometimes the war is lost even before the battle begins. During grad school, I wrote a whole bunch of web apps entirely in R using Shiny. It was clunky as hell, but yeah, it worked. I went looking for what's up with Shiny these days and found this - https://shiny.posit.co/
So yeah, full on pivot into python. pip install shiny. Alright!
"No web development skills required. Develop web apps entirely in R I mean Python"...yeah that's not happening.
Could be worded better but I would interpret it as "No web development skills required to start developing web apps entirely in R/Python". You're still expected to learn web development but within the context of an R/Python environment
"Clever" and "frontend" with Python honestly concerns me.
I realize TypeScript may be doing the same thing but that somehow tastes OK because it was purpose built for the task. (Although I abhor cleverness in general).
I feel like everything is eventually going to go full circle back to Google Web Toolkit[0]. The original "write it all in X language" toolkit with compile to JavaScript functionality.
I was a massive GWT fan - particularly because it played well with the Java ecosystem.
1. huge programmer pool
2. tried and tested legacy code could be easily used / adapted
3. code quality / checkstyle plugins just worked
4. great testing tools
My main gripe was the compile time (often 2-3 mins)...whereas Adobe Flex would crank code out in 3 seconds.
Now, the new language models should help us push through the noise.
There is no denying the importance and usefulness of web apps. You and me may be fine writing JS/TS, but many don’t want to. Why shouldn’t there be an option that works better for those folks?
JS got popular on the server because it was the default option on the client. Makes sense that Python should get popular on the client because it's the default option on the server.
Never to the degree JS on the client is, though the early and strong support on PaaS/serverless systems gaveit something of an edge for certain server-side stuff, and it was popular for a long time (though not dominant) outside of that.
Really, I think the main driver for isomorphic Python web libraries like this isn't general web apps (though they'll get used for that, too), but the putting frontends on data science, ML, etc., stuff where Python is the dominant tooling language.
I agree, the datascience / ML crowd is _probably_ more interested in having something simple and easy/fast to implement to put in front of their data than in having a proper web framework with all the bells and whistles a software engineer would prefer.
Good luck with that!
I think using python for anything beyond a simple script or PoC, should be taken as a red flag in development and immediately revise that decision of using it.
Could you elaborate as to why?
I’ve used to program in PHP and have moved (since I forgot most of PHP) to Python and I don’t get why people are displeased by it.
By and large "people" are not "displeased" by Python. But every language has a set of diehards, people who dedicated decades to this or that and resent adopting anything else. They will complain no matter what. Python is displacing a lot of other platforms in its continued rise, so the noise keeps going up.
In addition, there are groups of nerds that love to formalize absolutely everything in their code, development speed be damned; and people who will optimize every line they write to an inch of their life (again, dev speed be damned). Both those camps are often uneasy in an ecosystem built on duck-typing, "practicality beats purity", and an overall approach favouring development speed over machine speed.
Some people are die hard python fans, trying to use a scripting language for everything. I encountered some where they try to use Python in embedded (robotics to be exact) and oh boy how terrible it was, a “collision avoidance” was taking few seconds to respond..
Some of us just need a simple webform for our project. Keeping all code in Python makes sense. Nearly all generative AI projects with a web frontend on Github use libraries like Streamlit etc.
And, while Phyton would not be my preferred choice for robotics, I did write kernels for small 'autonomous' mobile robotics a long time ago in C. The systems ran at 20 hz. I'm pretty confident modern embedded computers running Phyton can achieve 20 hz sense/think/act cycles.
> Some people are die hard python fans, trying to use a scripting language for everything.
Kind of a weird thing to say when the domain is web frontend where the default (which this wraps) is JS, another “scripting language”, to the extent that label actually means anything (which it mostly doesn’t.)
Why not? Someone has found a way to fit a square peg into a round hole, your round pegs still work the same as they did before, people just have more options now.
I haven't worked with Python in many years now. Do people not use Django or Flask anymore? What's the recommended web stack, and where does this one fit in?
I still use Django, and I love it, but it can be a bit of a heavyweight framework. I wouldn't call it cumbersome, but I couldn't imagine using it to build a single page web app without a backend for example, it's just a bit overkill.
I'd see this as more like Svelte (or at least the projects I'd usually build with Svelte I might consider this for instead).
Reminds me of some of the crazy stuff microsoft tried with ASP and ASP.NET back in the day that made it really hard to build applications in a disciplined way.
I love this style of web development. I'll go to lengths to avoid doing anything {Java,Type}Script when building web applications. My last favorite was Seaside w/ Smalltalk – not quite the same thing as this project though (Seaside works mostly server side).
I don’t think this is a good idea, playing with the components there’s like a whole second for the checkbox to change status.. I don’t think python is even a good tool for ML/AI either. Maybe to prototype a UI but to be used in the wild, I don’t think so.
- you still use html and a templating language for the views
- it mostly looks like old ssr code but you can transparently call methods on the server (like meteorjs)
- you get one of the best ORMs in existence with great relationship handling and generated admins
https://www.django-unicorn.com/examples/search
Not 1.0 yet but I'm using it in production and omgosh is it easy to crank out UIs.