News

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 at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube