#π Host website through network drive?
174 messages Β· Page 1 of 1 (latest)
@quiet gulch
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
does your website have some sort of backend like django , flask , etc ?
Nicegui
The reason I am asking the question is because I do not know yet the IT limits for this company so I do not know what host I could use
Yes. Even simpler if its a static website
Just plain HTML
when you say "host" do you mean locally ? or for everyone in the world ?
locally
If u mean that u want to be able to host a website locally trough youre ipv4 you could just use iis
without any computer running it
Ah nvm
the python code needs to run "somewhere"
If the network drive is 192.168.100.123 and its stored in a folder called "website" with all of your HTML files in there, then you can easily host it and access it on your browser: http://192.168.100.123/website/index.html
yeah thats a problem
Yeah
but then that would make the dev process unnecessary complicated
Then take the "frozen" static files and "host" them
Would that make the website accessible without anyone running the code?
Yes
well it is letting the user upload a csv file and then will make some calculations and present the result
what does your web app do ? @quiet gulch
yeah no , that probably cant be converted to a static site imo
u h
maybe?
Then definitely can't be done
techinically you can write javascript and move all the logic to the browser and make it into a static site
but then you just writing javascript, no point of that nicegui framework
Ask your IT to provision you a VM for you to deploy your webapp to @quiet gulch
ough haven't learned javascript yet
Yeah I believe that is my greatest choice
Its really not that hard
The syntax is just unnecessarily long
but its not really a solution for this problem imo
yeah exactly
Ugh hopefully they just tell me I do not have that limited choices and the whole thing will be easy
otherwise what is my option? jupyter?
imagine accidentally adding + + and not knowing where the issue is
> "a" + + "b"
'aNaN'``` who did this
who hurt you
Never said it didnt suck, just said its not that hard to learn
Its the first language i learned
are you developing the app right now ??
or is the app ready and you just want it deployed ??
are only you going to access the app ? or is everyone going to access it ?
bro has not seen C++
or java
Devoloping right now and the only things missing should be the calculations and present the result
True
I need some of my colleagues to be able to access it
and I want to make it as simple as possible for them
for dev phase , you should do it on your local machine
as for deployment , asking the admin to get you some VM to host it should be the way to go
So instead of them having to know how to run the code and change either the file name or change the code to match the new file name I wanted them to be able to just upload the file through a website
If u deploy that website somewhere else can u access it from the network?
How u mean?
Like can someone open it like they would when its in ur network drive?
Idk this backend so
( usually you dont do stuff like this yourself , you might not be familiar with the network / gear. People are there for reasons )
Yeah I mean doing my first programming job working alone on the projects:/
Also is there a specific reason ur hosting on a network drive?
your company has a system admin right ?
Yeah that isn't working here
since the company I am working for is a small part of a huge buissness
ok so the bottom line is , your app has a python backend , that python code needs to run somewhere everytime someone accesses it
so when you mean "deploy your web app" , that means you need some sort of computer to run that python code
do you have such a computer where you can deploy to locally ?
if you want the app to be accessible 24x7 , the computer needs to be on 24x7
No that is the problem
you dont need a full PC dedicated to this one thing , any PC should which already is running "should" work , like your network server that hosts the network drive in the first place
for example , even your personal PC could also work , but its not really a good solution for various reasons like the app wont be accessible when you log out of your PC , you PC would have unnecessary software eating up small resources , it would write to your storage drive which might not be ideal
if this all doesnt work for you , then your option would probably be deploying in cloud as Qoyyuum suggested above
and it will most likely cost you a little bit of money
Oh what have I given myself into
just get yourself out of it
Yeah it does not seem to be a choice to have it running all the time on a PC
So the question is should I drop the whole website idea? and try to find another solution that could make it easy for them to use?
Is Jupyter an option for this? @novel saddle you know my project from before
I don't remember your project from before
But it sounds like something that can be done with Streamlit
Or Taipy
jupyter also needs a kernal running in background
if your end users can have that running , might as well have them install python and use the regular script or make some sort of GUI

Oh really
Yeah cause that would lead into such complexity
needing all of them to install all libraries
and something to run the code in
you can stuff all the requirements in a requirements.txt file , and pip will install all the libraries with the correct version with just 1 command
and if you make a GUI , the python code will run on their own machine
you can technically bundle your python code and the interpreter into a .exe app , but windows flags those exe as virus for no reason
so you can just have them install python 1 time and then after that , they can use your app like a regular app
but this is a very shady way to do it imo
Yeah okay but seems like a reasonable solution still
how do you mean make a GUI
Sorry
I mean for what should I use to make a GUI
like , use a framework like tkinter , make an app that you can double click and open
Yeah that was my first idea until someone told me it would work running as a website
i mean , if you can get every employee to install python and then give your python code to them
any solution will work , website , GUI
you can probably even give them your current script and tell them to run it , and go to a specific URL in browser , they can use the app
Yeah okay but saul
That means I would be able to add the app into the network driver right?
and they could just double click it there?
no , python needs to be installed on their computer ,the python code needs to be on their computer , they need to double click the app in their computer
network drive has nothing to do here
network drive is just a pendrive , a pendrive cannot run apps
But if they have python installed
Why would they not be able to open it via the network drive?
I have the code laying there right now?
you mean , the python code will be on the network drive ?
Yeah exactly
sure ig, the python code is probably fine living on the network drive
i havent tried it myself , so i cant gurantee it , you can try and find out
The users would still need to pip install the dependencies
But thats a one-off thing
Until the requirements change

fwiw if you have that deep allowance to the company network to the point where company doesnt care what you do on local network
you can just check who is hosting the network drive , and ask if you can run a docker container on there too
with a docker container , you dont need to worry about any of this , it will act as your server and people can just go to that URL and use the app as you initially intended
Really?
Using a docker container
would mean I could have them upload the file in the frontend and still have the backend working?
a docker containe that is running on a computer yes
yes
so that would mean I still need something that runs it 24/7? or what
i mean , your company's computer that hosts those network shares is already running 24x7 isnt it ? ?
you just ask boss man if you can deploy your app on that computer
network drive that you see in your PC is a hard disk connected to another computer in the network , and that computer has some software / setup that makes it appear as a network drive
so its still a computer at the end of the day
which can also run other apps if you want
Yeah right I understand that
So yeah you are right, I should just ask about it
@void dew I should try bringing another computer after lunch maybe and try some
Is docker free? or would I need to pay
its free software
it enables you to run different apps in isolated containers
so you dont mess with system stuff
Oh okay
Because if that works it would be so good for me
cause this discussion has given me multiple heartattacks
thats just how deployment be π
Okay that is quite a relief to hear
It feels hard, first ever permanent employee
and working alone with the project with no one in the company that knows any programming
oof
That is why I need to come here for these questions
Okay I wrote a list
From best to worst scenario from my understanding of this discussion
- have the app running on the same computer that runs the network device and using docker container
- Host it via some other company? Then the problem with backend not working is back I guess
- Use Tkinter and make a GUI and make it an exe and put it in the network device
@void dew
The 2nd point can be done with a docker container too and deploy that to fly.io or render.com
I'd say the cloud hosting one is probably the best option. So all users can access it from anywhere and anytime on any machine
1, 2 will do pretty much the same thing , the backend will run on a computer
in first case the computer will be your own company's PC , in second case ,the computer will be a computer in cloud
and the URLs will be little bit different in each case
and most importantly , option 1 is pretty much "free" , option 2 will cost you little bit of money
1 ,2 are the most hassle free options that do exactly what you want them to do ( user goes to a website , uploads a CSV file , gets the new converted CSV file without having to worry about any installation or whatever)
option 1 will be a bit more involved than option 2 because not only you have to make the docker app , you also have to install docker on the network drive's host PC , set it up to serve the apps ( sure its a 1 time setup thing ) and secure it , maybe lock the access to certain computers if you want
option 3 is the most complicated of all
there are 2 option in option 3 , a and b
option 3.a is that you bundle your script and python as an exe and give it to users , but this exe will be marked as a virus by their antivirus ( you can whitelist the app one time and this wont be a problem anymore)
option 3.b is that you setup python and the dependancies individually on everyone's computer , and then you tell them to use the app by double clicking the python file in the network drive
option 3a and 3b can be a website too if you want (you tell your users to run the python app , and then go to a certain URL in their browser) , you dont have to rewrite the whole UI for GUI
Hmm maybe I am making it hard on myself
Yeah right the marked as virus..
Otherwise it would be super simple
I call for a quick meeting and give them all it as in option 3b
cause NiceGui opens the website automaticly on running the code
and then they would just need to upload the file
my suggestion is , if money is not an issue , option 2 is the most easiest to setup
if money is an issue , option 1 is the most eaasiest
option 3 should be a last resort
its a feature , you can probably just disable it to do that
believe me that setting up software on every single individual's PC is not fun
if the PCs are beefy resource wise , you can use option 3 along with docker , that could also be an option
Yeah I believe the money is not the problem
but having a constant payment that needs to get paid
then just try out a VPS for some time , see how you like it
@quiet gulch you could alternatively use a raspberry pi - though that too requires some learning and customization
though this option is dependent on the requirements of the project. you might not need an entire raspberry pi just to run some small script.
Not an option for this project at the moment
How much money are we talking for option 2?
I guess I still can tell the option to my boss
if i were in your place
i would try the option 1 , because i am open to experimenting and i am okay with investing some time in learning this new thing ( which will be hosting with docker for you )
i would say you can dedicate 1 full day to this , and get your app up and running by the end of the day most likely
that depends on the provider you choose , but it will not be too much , few bucks per month
Yeah there are multiple questions in the air right now about option 1
for me
well ill leave you up to some thinking then
i gotta go too
have a good one
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.