Visual Studio Code for Python Programmers

Book description

Become proficient and efficient with Visual Studio Code and learn how to integrate all your external tools!

Visual Studio Code for Python Programmers helps Python developers become not just familiar, but productive in Visual Studio Code. To start, you’ll find the steps for installing Visual Studio Code on Windows, Mac and Linux platforms, along with an introduction to the editing features of the workspace. Coverage of more advanced functionality includes managing source code, debugging, unit testing, and Jupyter Notebook support. The book finishes with a walk-through of real-world projects which utilize Visual Studio Code features introduced in the book.

For developers, the choice of an editor is a very personal one. You have idiosyncratic needs and wants that are unique to you as a developer. This book will help you learn how to customize Visual Studio Code to meet your needs and Python development workflow.

  • Introduces you to the features of the Visual Studio Code workspace and how those features can be customized
  • Demonstrates how Visual Studio Code allows you to choose your structure according to your needs
  • Covers editing code in Python, including syntax highlighting, code completion, object definition, refactoring, and code navigation
  • Describes Git integration and how to perform common Git functions (commits, checkouts, branches, and merges) from within Visual Studio Code
  • Highlights debugging features for Python developers
 A final section on Real World Applications will step you through several examples (and features integration with Django, Flask, Jupyter Notebook, Docker, and Azure), so you can hit the ground running with Visual Studio Code.

Table of contents

  1. Cover
  2. Title Page
  3. Introduction
    1. Who Will Benefit Most from This Book
    2. Special Features
    3. How to Contact Wiley
  4. Part I: Welcome to Visual Studio Code
    1. CHAPTER 1: Getting Started
      1. Installing Visual Studio Code
      2. The Visual Studio Code User Interface
      3. Command Palette
      4. Extensions
      5. Customizations
      6. Summary
      7. Note
    2. CHAPTER 2: Hello World for Python
      1. Installing a Python Interpreter
      2. Installing the Python Extension for Visual Studio Code
      3. Creating a Python File
      4. Selecting an Interpreter
      5. Selecting a Linter
      6. Editing a Python File
      7. Running a Python File
      8. Workflow Recap
      9. Summary
    3. CHAPTER 3: Editing Code
      1. Quick Fixes
      2. Code Completion, Definitions, and Declarations
      3. Formatting
      4. Linting
      5. Refactoring
      6. Snippets
      7. Summary
  5. Part II: Additional Visual Studio Code Features
    1. CHAPTER 4: Managing Projects and Collaboration
      1. Files and Folders
      2. Environments
      3. Source Control
      4. Live Share
      5. Summary
    2. CHAPTER 5: Debugging
      1. Starting a Debug Session
      2. Debug Commands
      3. Call Stack
      4. Triggering a Breakpoint
      5. Logpoints
      6. Watch
      7. The Debug Console
      8. Launch Configurations
      9. Summary
    3. CHAPTER 6: Unit Testing
      1. Enable and Discover Tests
      2. Run Tests
      3. Debug Tests
      4. Summary
    4. CHAPTER 7: Jupyter Notebook
      1. Creating and Opening a Jupyter Notebook
      2. Code Cell Modes
      3. Adding Cells
      4. Editing Cells
      5. Running a Cell
      6. Viewing Variables and Data
      7. Viewing Plots
      8. Debugging a Jupyter Notebook
      9. Connecting to a Remote Server
      10. Exporting a Notebook
      11. Summary
    5. CHAPTER 8: Using Git and GitHub with Visual Studio Code
      1. Getting Started
      2. GitHub Pull Requests and Issues Extension
      3. Publish a Project to GitHub
      4. Push Changes to GitHub
      5. Manage Pull Requests and Issues
      6. Clone Repository
      7. Timeline View
      8. Summary
    6. CHAPTER 9: Deploy a Django App to Azure App Service with the Azure App Service Extension
      1. Getting Started
      2. Creating a Django Project
      3. Creating an App
      4. Creating a Home Page
      5. Creating Website Pages
      6. Deploying to Azure
      7. Summary
    7. CHAPTER 10: Create and Debug a Flask App
      1. Getting Started
      2. Create a Flask App
      3. Create and Render a Template
      4. Debug the Flask App
      5. Summary
    8. CHAPTER 11: Create and Deploy a Container with Azure Container Registry and Azure App Service
      1. Getting Started
      2. Create a Container
      3. Debug a Container
      4. Push an Image to the Registry
      5. Deploy the Container Image to Azure
      6. Make Changes to the App and Deploy
      7. Multicontainer Apps
      8. Summary
    9. CHAPTER 12: Deploy an Azure Function Trigger by a Timer
      1. Getting Started
      2. Create an Azure Function
      3. Invoke the Function Locally
      4. Add the Code to the Function
      5. Deploy the Function to Azure
      6. Summary
  6. APPENDIX: Getting Started with Azure
  7. Index
  8. Copyright
  9. Dedication
  10. About the Author
  11. About the Technical Editor
  12. Acknowledgments
  13. End User License Agreement

Product information

  • Title: Visual Studio Code for Python Programmers
  • Author(s): April Speight
  • Release date: July 2021
  • Publisher(s): Wiley
  • ISBN: 9781119773368