I have a dictionary (language learning) project written in Python that I would like to migrate online. But I pretty much have no web programming experience. What do you recommend as the best resource to teach myself how to web program? (at the moment I just interact with the dictionary in a linux shell).
Thanks.
If you interact with the shell, you need to know the path to your programe. In the case of the web your path may include web URL. I would ask chatGPT on how you can give access to sombody, that they can connect online for example to your working station and use your programe.
Find a tutorial
Start by looking for tutorials on Youtube about building a web server using Python. You will need to use one of the frameworks like Django or Flask to do this.
So an example search on Youtube would be: /web page tutorial Python Django/
with the slashes.
I’ve recently done this. It’s not a quick process. But it’s not bad either. Eventually I will host on the Azure system from Microsoft.
Then you will need a web host to host your program. There are different types of web hosts.
Python hosting
These are for specifically hosting Python apps.
- Attempt This Online. Run Python 3 and many other languages online. Free and no ads. https://ato.pxeger.com/ When copying code to clipboard, use CGCC post to get it in Markdown.
- Hostinger. Currently $2.99usd/month + 3 months free. It’s normally $11.99usd/month. https://hostinger.com
- Microsoft Azure. Azure has several ways to host apps and the cost changes accordingly. Use a full server instance for the most expensive option. Or a Function App (using Python up to 3.11) for a less expensive option.
- PythonAnywhere. Go to https://Pythonanywhere.com. Plans start at $5/month. See CPU usage and disk usage. It supports Python up to 3.10, but also Ipython, PyPy. Create, edit, delete files.
- Databases supported: MySQL, Postgresql (for upgraded accounts).
- Create a web app with Django, Flask, web2py, Bottle, or manually.
- Schedule tasks to run daily or set up always on tasks. Useful for chat boxes.
- Customize your plan for CPU time used, number of web apps, number of web workers, number of always-on tasks, disk space available.
- Siteground. Starts at $2.99usd per month. This looks like an intro price which will at some time revert to a normal prices of $17.99usd per month. https://siteground.com
General hosting
There are various options for general web hosts and it generally costs more to get shell access, rather than just use Cpanel, a common app to manage a web site of static web pages.