How Python is used as a back-end in web dev ? | Sololearn: Learn to code for FREE!


How Python is used as a back-end in web dev ?

Good morning ducks, As we know, Python is a back end programming language, but how we merge HTML/CSS/JS and Python to make a website ? by Python front end modules ? or frameworks or what ?

1/30/2021 9:03:39 AM

Agt Reda

11 Answers

New Answer


Python works in server, when web page requesting a server. There are 2 web development frameworks for Python. 1. Django 2. Flask


by sending text (html) response on server side to client (http) requests. usually, templates are used, where you could "merge" python code with html stuff, but all the python is interpreted at server side, and client only receive html (without any python code)...


There are more than two web frameworks for python... there are a lot available:


visph i tough you need css and js too?


yes, when I said html, i thought "html bundle" (wich implies css and/or js if needed, as well as pictures, svg, or any other linked files)


Oh okay. Thanks for the answer!


visph Didin’t understand you, is there a video that explains that please ?


basics (templating not covered) of bottle (a python http micro framework): template basics (in bottle):


visph But in which server ? it operates on cloud or database or what


Any server: it could be your own PC, your phone or obviously cloud... database is another question ^^


We join a Python backend to a HTML/CSS/JS front end with JSON formatting. In an oversimplified nutshell; the Python back end receives JSON encoded messages from the client, decodes them, performs the work, encodes the appropriate JSON response, and sends it to the client for decoding and execution.