Share via


Getting Started with PTVS: Building a Website in Azure

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

You can get started quickly building a Python web site in Azure.

You can watch these instructions in a very short youtube video.

Start with the New Project … dialog and under Python projects choose the Bottle Web Project. This Bottle template is a starter site based on the Bootstrap framework. When you create the project, Visual Studio prompts you to install dependencies (Bottle in this case) into a virtual environment. Because you’re deploying to an Azure website, you need to add the dependencies to a virtual environment in order to deploy necessary bits for your site’s operation. You also need to base your environment on Python 2.7 or 3.4 32-bit. Once you create the project, press F5 to start running your site locally.

It is easy to try the site in Azure. If you do not have an Azure subscription, you can use try.azurewebsites.net. This site offers a simple way to try out Azure Websites for an hour at a time with only a social login. You do not need a credit card. Choose the Empty Site template in the Change Language dropdown and choose Create. Under “Work with your web application” choose Download Publishing Profile and save the file for use with Visual Studio. You could also deploy using git from any operating system.

Switch back to Visual Studio and the project you created. Select your project node in the Solution Explorer, Choose the right pointer button, and choose Publish. If you have an Azure subscription, you can click on Microsoft Azure Websites in the dialog to manage your sites from here. For this walkthrough, choose Import to import the publishing profile you just downloaded. Because the publishing profile has all the necessary information, you can choose Publish. In a few seconds a new browser window will open, and your site is live hosted on the Azure cloud.

Simple websites are easy, but for information on more significant web applications in Azure, see the deep dive video as well as others in this channel (link in the upper right of the getting started or deep dive video page, as well as below.

You can watch these instructions in a very short youtube video.

See Also

Wiki documentation
PTVS Getting Started and Deep Dive Videos