Python: How to create simple web pages without a huge framework? [closed]

2024/10/16 0:16:57

I would like to know if there is a way to create web pages without a huge framework in python.

I think of something like PHP/Apache, which comes just as a language and not with to much overhead (but I don't like PHP...). In PHP there is no ORM, no template engine, etc. But it is very very easy to just print a Hello World to the browser.

I know about Django and really like it, but it is a bit too big for simple web portals (5-10 pages).

I really like something simple, without installing too much.

Answer

Have you looked up Flask?

It's a much more minimalistic framework, and very easy to set up and get started.

https://en.xdnf.cn/q/69221.html

Related Q&A

AttributeError: module MySQLdb.constants.FIELD_TYPE has no attribute JSON while migrating in Django

I do not know in what way solve this error. Any hints? I have simple Django projects and receive this error when try to do python3 manage.py migrate. This is related to any programming error in app or…

Downloading file using IE from python

Im trying to download file with Python using IE:from win32com.client import DispatchWithEventsclass EventHandler(object):def OnDownloadBegin(self):passie = DispatchWithEvents("InternetExplorer.App…

Good resources to start python for web development?

Im really interested in learning Python for web development. Can anyone point me in the right direction? Ive been looking at stuff on Google, but havent really found anything that shows proper documen…

django file upload: [Errno 13] Permission denied: /static

I am trying to upload several files in django. On my local maching where I use the djangos build in server everything works fine but on my productivity server I get this error:[Errno 13] Permission den…

efficient way to change the header of a file in Python

I am trying to write a python script to update the header (only the first line) of some huge files, but as the new header is not necessary to be the same size (in bytes) as the original one, is there a…

Converting a numpy array of dtype objects to dtype complex

I have a numpy array which I want to convert from an object to complex. If I take that array as dtype string and convert it, there is no problem:In[22]: bane Out[22]: array([1.000027337501943-7.3310852…

Python ZeroMQ PUSH/PULL -- Lost Messages?

I am trying to use python with zeroMQ in PUSH / PULL mode, sending messages of size 4[MB] every few seconds.For some reason, while it looks like all the messages are sent, ONLY SOME of them appear to h…

Using object as key in dictionary in Python - Hash function

I am trying to use an object as the key value to a dictionary in Python. I follow the recommendations from some other posts that we need to implement 2 functions: __hash__ and __eq__ And with that, I a…

Compressing request body with python-requests?

(This question is not about transparent decompression of gzip-encoded responses from a web server; I know that requests handles that automatically.)ProblemIm trying to POST a file to a RESTful web serv…

pyspark row number dataframe

I have a dataframe, with columns time,a,b,c,d,val. I would like to create a dataframe, with additional column, that will contain the row number of the row, within each group, where a,b,c,d is a group k…