Understanding A Sample Flask Web Application Skeleton
ฝัง
- เผยแพร่เมื่อ 24 ส.ค. 2024
- Flask is a web application framework written in Python. It is developed by Armin Ronacher, who leads an international group of Python enthusiasts named Pocco. Flask is based on the Werkzeug WSGI toolkit and Jinja2 template engine. Both are Pocco projects.
We at iNeuron are happy to announce multiple series of courses. Finally we are covering Big Data,
Cloud,AWS,AIops and MLops. Check out the syllabus below.
30 Days Data Science Interview preparation - rb.gy/q1c58g
Big Data Master-rb.gy/xg1ob7
Business analytics-rb.gy/herdd8
Aws Cloud Masters- rb.gy/x5poyj
AI OPS- rb.gy/kionj6
Incase of any queries you can contact the below number. Happy Learning!!
8788503778
6260726925
9538303385
8660034247
9880055539
Every Python module has it’s __name__ defined and if this is ‘__main__’, it implies that the module is being run standalone by the user and we can do corresponding appropriate actions.
If you import this script as a module in another script, the __name__ is set to the name of the script/module.
Python files can act as either reusable modules, or as standalone programs.
if __name__ == “main”: is used to execute some code only if the file was run directly, and not imported.
When you use the condition if __name__ == "__main__":, the code inside that block will only run if the current script is being directly executed as a standalone script.
If the script is imported as a module into another script, the code inside the if __name__ == "__main__": block will not run. This allows you to have certain code that should only execute when the script is run directly, but not when it is imported as a module.
When you write a Python script, you might want some parts of the code to execute only when the script is run directly, not when it's imported as a module into another script.
The line if __name__ == "__main__": allows you to achieve this behavior. Here's how it works:
Direct Execution: When you run a Python script directly (by calling python script_name.py), the special variable __name__ is set to "__main__". This indicates that the script is being executed as the main program.
Imported as a Module: When you import a Python script into another script or interactive session, the __name__ variable is set to the name of the module (i.e., the filename without the .py extension), not "__main__".
Thank you krish for giving good Kickstart towards learning this framework 👌🙏
More flask videos please!!!
Learning this on the job, in office hours, project manager told me to do so.
Thank You Sir Much Needed ✨
flask (and python) looks very similar to Ruby and Ruby on Rails! Nice video.
While debugging my flask application, I got an error - Visual Studio Code Python debugging "Exception has occurred SystemExit". My work-around was to uncheck "Uncaught Exceptions" in the breakpoint menu at the bottom of the debug window, in case someone gets the same issue.
Excellent .
If possible can you make one video to browse csv file and do some data preprocessing using python in flask application. It will be useful for me.
Sir, Python Full stack ka next course kb chalu hoga and is it possible for an employed guy to take up this course, Thanks in advance
🎉 awesome
Wow...
Great
That's a brilliant video.
Thank you very helpful video
Thanks Krish
if iam clicking python app.py .My PROGRAMME IS NOT RUNNING
Thank you Sir 🙏
Hiiiii.... Please provide a fresher sample resume for the data science role
Day 8 - 29/02/24
please upload a video for creating e2e sales forecast prediction application using angular and python
can anyone help me if i used debug=True code is not getting updated
awesome
its not detecting change pls help
where is the requirement.txt????
can we do the same in jupyter?
❤️
150th view
which theme is this