Replies: 2 comments 1 reply
-
Hey! I got a working example with Fastapi Basic for now... |
Beta Was this translation helpful? Give feedback.
-
I originally had in mind that framework integration would be via separate repos. For example, I made a little experiment for Django. One thing that's different from Vue/React/Angular is that with PuePy, there's no build step at all, so commands like Are you familiar with cookiecutter? I think it would probably be the best way of unpacking starter projects. BTW, you can run a Python web server just with this:
|
Beta Was this translation helpful? Give feedback.
-
The problem
Hello, I'm super new here. I was taking a look at this project and it looks GREAT! I'd love to contribute, or at least use it 🥲.
I'd appreciate a
fastapi
integration starting point. I tried to install and runpuepy
viapoetry
then created the [index.html
,main.py
,pyscript.json
] and downloaded the wheel file...But I didn't figure out how to serve the "minimal app" I tried to run just
python3 main.py
but of course, this didn't work, (I can imagine that file should be sent to the client).So I cloned the repository and used the
serve_examples.py
which worked as expected, but I don't know how to decouple that "not than minimal" examples project into an app's starting point.The Proposal
In Summary, I wonder if you could provide a minimal CLI (i.e.
pue
) with at least three commandsinit or new
,dev or run
, andbuild
(in the future this could grow to include common backend integrations like Django, Flask, or FastApi ❤️ )pue init
orpue new
So, like in
vue
,react
,angular
, or almost any fe framework, we can start a minimal app with the basic files str/(index.html
,__init__.py
,styles.css
) and please the required files to run (pyscript.json
, the wheel file, etc.)pue dev
orpue run
starts a simpler (or not) live server to start working on the app
pue build
To put everything together into a
templates/
orstatic/
folder to be served with Django, flask, FastAPI, or any of that kind...Thanks for doing this!
Beta Was this translation helpful? Give feedback.
All reactions