Live data from Hacker News

Designing a Pure Python Web Framework

reflex.dev

31–40 of 59 posts

Re: Designing a Pure Python Web Framework

#32
post #30

I've tried it in my company. It's great, but the builds were annoying because of pip failing to solve the dependencies when using Reflex together with other big libraries. I'll give it another try in the future.

Hey thanks for the feedback. We're working on relaxing our dependencies [1] to make reflex more compatible. Do you remember what libraries you had the conflict with?

[1] https://github.com/reflex-dev/reflex/pull/2796

Re: Designing a Pure Python Web Framework

#33
post #6

Earlier quoted context omitted.

All programming is abstractions, unless you're using machine code. Abstractions don't necessarily make debugging harder -- done the right way, they can make it easier. (Yes, you can call it "pure python" if it compiles to something else, because every programming language compiles to something else.)

10100010 00000000 10111101 00010011 00001000 10011101 00000000 00000100 11101000 11100000 00101100 11010000 11110101 01100000 01010010 01100101 01100001 01101100 00100000 01110000 01110010 01101111 01100111 01110010 01100001 01101101 01101101 01100101 01110010 01110011 00100000 01100011 01101111 01100100 01100101 00100000 01101001 01110100 00100000 01101001 01101110 00100000 01100010 01101001 01101110 01100001 011100…

“ �����,��`Real programmers code it in binary”

Re: Designing a Pure Python Web Framework

#35
post #30

I've tried it in my company. It's great, but the builds were annoying because of pip failing to solve the dependencies when using Reflex together with other big libraries. I'll give it another try in the future.

Hey thanks for the feedback. We're working on relaxing our dependencies [1] to make reflex more compatible. Do you remember what libraries you had the conflict with? [1] https://github.com/reflex-dev/reflex/pull/2796

This PR is super-helpful -- it's nearly impossible for me to work with projects that pin to specific versions, since it leads to so many conflicts. Having minimum versions like in this PR makes life much easier!

Re: Designing a Pure Python Web Framework

#36

This looks like a really neat project! The examples certainly feel less “script-like” than streamlit. One thing I find disappointing though, is that this framework is built on top of FastAPI. I feel it’s a bad idea to build on top of what’s basically a one-man project. No matter how popular that project is.

I wouldn’t worry about using FastAPI. Not that your point is wrong but the code base isn’t exactly large and it’s entirely open source. If the project goes off road or something you can always continue on your own fork.

I’m not sure why you wouldn’t use FastAPI for this. It’s popular because it’s really good.

Re: Designing a Pure Python Web Framework

#37
im super excited to use this

it has a lot potential

just needs more tutorials and github projects using it

i feel like this scratches a lot of itch and the HN comments here aren't doing it justice.

I am not even an investor in reflex and im using it and i love it

frontend for backend (python)

Re: Designing a Pure Python Web Framework

#38
post #4

Anvil [1] is another "pure Python web framework", where you write both the client and the server code using Python. (The client code gets converted to JavaScript so that it can run in the browser.) Anvil has been around since 2016 [2]. [1] https://anvil.works/docs/app-architecture [2] https://anvil.works/blog/page/15.html

oh wow oh wow!

i didnt know about this, this goes even further with a UI editor (that is a killer app)

I'm going to have to pause reflex (im still loving it so far) and take a look at anvil here because it seems to be more mature and baked product than reflex as it stands

one thing i appreciate about Reflex is it feels programmatic and familiar with background in python backend...so maybe its suitable for more limited scope items? perhaps UI editor like anvil is what reflex needs to implement?

Anvil just takes my breath away, i can't believe i never saw this before

edit: okay so i got excited and to run one of the boilerplate apps I need to enter my credit card for a 7 day trial for my python environment to make the app work properly ?! this is such a bad experience for new developers. now i understand why nobody around me suggested it. sigh....going back to reflex.dev

Re: Designing a Pure Python Web Framework

#39
post #5

Can you call it pure python if it compiles to React? Seems like the abstraction just makes it harder to debug

We need to compile down to React/HTML in the end as it's the only way to render a webpage. By "pure Python" we meant from the developer's perspective they won't have to touch React or Javascript. We only use React for the UI layer and to send events. Since all the state/logic is kept in Python you won't see Javascript errors during runtime, and debugging can mostly be done in Python land.

Wow, you literally got everything wrong in this comment.

- There are a thousand ways to render HTML, you don't need React at all. Even for interactive pages (see recent alternatives like HTMX, or decade old solutions...)

- If it is converted to JS/React it's obviously not "pure" Python. Sorry, but that's just silly to say that.

- You will definitely see JavaScript errors during runtime, it's inevitable. Maybe not with simple toy projects, but with serious projects, it will happen and will make life miserable.

Post reply on HN