Django, Flask Web App Tutorials Added to Python Docs for Visual Studio, VS Code
Microsoft added new Web app tutorials -- covering Django and Flask -- to its Python documentation for Visual Studio and its open source little cousin, the cross-platform Visual Studio Code editor.
Python is one of the hottest programming languages around right now, having recently been dubbed the preferred language among developers in a HackerRank developer skills report and the fastest-growing major programming language by Stack Overflow. What's more, the PYPL Index that measures programming language popularity recently reported Python was on track to upstage perennial No. 1 Java.
As such, Python is also wildly popular among VS Code developers, with the Python extension No. 1 among offerings in the Visual Studio Code Marketplace, having been downloaded more than 13.8 million times. Although the language is less popular with the .NET-centric Visual Studio proper crowd, its Marketplace also features numerous Python-based extensions.
And within the Python ecosystem, Django and Flask are among the more popular Web app frameworks, so Kraig Brockschmidt, content developer for Python in Visual Studio and Visual Studio Code, yesterday called attention to recently published tutorials for those offerings in Microsoft's Python documentation.
Written in Python and maintained by the Django Software Foundation, Django is a free and open source framework following the model-view-template architectural pattern. Flask, also written in Python, describes itself as a microframework because no specific tools or libraries are needed to use it, or, as Microsoft says, "because it doesn't directly provide features like form validation, database abstraction, authentication, and so on," which are rather provided by its own extensions.
Brockschmidt called attention to:
- Using Flask in Visual Studio Code, which covers the creation of a Flask environment and developing a Hello World app, introducing Python debugging and debugger configurations, the use of page templates, serving static files and using template inheritance. Its code is parked on GitHub.
- Learn Django in Visual Studio, a six-part series that Brockschmidt said helps developers "learn about Django in the context of Visual Studio project templates. The tutorial explains everything that's happening in the templates, so you can easily adapt the template-generated apps to suit your own needs." It's also on GitHub.
- Learn Flask in Visual Studio, which follows a style similar to the above Django tutorial, this time with five steps. "Over the course of these steps you create a single Visual Studio solution that contains three separate projects. You create the project using different Flask project templates that are included with Visual Studio," it says. Its GitHub code is available here.
Speaking of templates, Brockschmidt also noted the recent addition of a reference for Python-related item templates in Visual Studio, covering several options ranging from an empty Python file to Django-, IronPython- and Azure-related offerings.
About the Author
David Ramel is an editor and writer for Converge360.