𝔖 Scriptorium
✦   LIBER   ✦

📁

Optimizing Visual Studio Code for Python Development: Developing More Efficient and Effective Programs in Python

✍ Scribed by Sufyan bin Uzayr


Publisher
Apress
Year
2021
Tongue
English
Leaves
220
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Learn Visual Studio Code and implement its features in Python coding, debugging, linting, and overall project management. This book addresses custom scenarios for writing programs in Python frameworks, such as Django and Flask.
The book starts with an introduction to Visual Studio Code followed by code editing in Python. Here, you will learn about the required extensions of Visual Studio Code to perform various functions such as linting and debugging in Python. Next, you will set up the environment and run your projects along with the support for Jupyter. You will also work with Python frameworks such as Django and go through data science specific-information and tutorials. Finally, you will learn how to integrate Azure for Python and how to use containers in Visual Studio Code.
Optimizing Visual Studio Code for Python Development is your ticket to writing Python scripts with this versatile code editor.
What You'll Learn

  • Execute Flask development in Visual Studio Code for control over libraries used in an application
  • Optimize Visual Studio Code to code faster and better
  • Understand linting and debugging Python code in Visual Studio Code
  • Work with Jupyter Notebooks in Visual Studio Code
Who This Book Is For
Python developers, beginners, and experts looking to master Visual Studio Code


✦ Table of Contents


Table of Contents
About the Author
About the Technical Reviewer
Acknowledgments
Introduction
Chapter 1: Introduction to Visual Studio Code
User Interface
Basic Layout
Side-By-Side Editing
Minimap
Indent Guides
Breadcrumbs
Explorer
Multiselection
Filtering the Document Tree
Outline View
Markdown Outline View
Open Editors
Views
Activity Bar
Command Palette
Configuring the Editor
Hiding the Menu Bar (for Windows, Linux)
Settings
Zen Mode
Centered Editor Layout
Tabs
Tab Ordering
Preview Mode
Editor Groups
Keyboard Shortcuts
Disabling Preview Mode
Using Ctrl+Tab to Navigate in Entire Editor History
Closing an Entire Group Instead of a Single Editor
Window Management
Setting Up Visual Studio Code
Cross-Platform
MacOS
Linux
Windows
Updating Cadence
Insiders Nightly Build
Portable Mode
Additional Components
Extensions
Key Bindings for Visual Studio Code
Keyboard Shortcuts Editor
Detecting Keybinding Conflicts
Troubleshooting Keybindings
Keyboard Rules
Accepted Keys
Command Arguments
Removing a Specific Key Binding Rule
Keyboard Layout-Independent Nindings
When Clause Contexts
Conditional Operators
Available Contexts
Programming Languages Supported
Language Features in VS Code
Changing the Language for the Selected File
Additional Components and Tools
Commonly Used Components
VS Code Extensions
Additional Tools
Settings Precedence
Settings and Security
Summary
Chapter 2: Getting Started with Python Programs in Visual Studio Code
Installation Basics
Reviewing the Required Extensions
Tabnine
Bracket Pair Colorizer
Python Snippets
Python Test Explorer for Visual Studio Code
Configuring Debug
Better Comments
AutoDocstring
Python Indent
Getting Started with Code Editing
Autocomplete and IntelliSense
Customizing IntelliSense Behavior
Troubleshooting
Running Selection/Line in Terminal (REPL)
Formatting
General Formatting Settings
Troubleshooting Your Formatting
Refactoring
Extract Variable
Extract Method
Sort Imports
Linting
Enabling Linters
Disabling Linting
Running Linting
Linting Settings
Specific Linters
Pylint
Default Pylint Rules
Troubleshooting Linting
Debugging
Initializing Configurations
Additional Configurations
Basic Debugging
Conditional Breakpoints
Invoking a Breakpoint in Code
Breakpoint Validation
Debugging Specific App Types
Summary
Chapter 3: Setting Up the Environment and Testing
Setting Up Your Environment
Manually Specifying an Interpreter
Selecting and Activating an Environment
Environments and Terminal Windows
Choosing a Debugging Environment
Environment Variable Definitions File
Variable Substitution
Using the PYTHONPATH Variable
Running Your Projects
Selecting a Python Interpreter
Creating a Python Hello World Source Code File
Running Hello World
Running the Python Debugger
Configuring and Initializing the Debugger
Defining Variables
Installing and Using Packages
Supportting Jupyter
Jupyter Code Cells
Additional Commands and Keyboard Shortcuts
Python Interactive Window
Plot Viewer
Live Share for Python Interactive
Variable Explorer and Data Viewer
Connecting to a Remote Jupyter Server
Converting Jupyter Notebooks to Python Code File
Debugging a Jupyter Notebook
Exporting a Jupyter Notebook
Configuration Files
JUPYTER_CONFIG_DIR
JUPYTER_CONFIG_PATH
Data Files
JUPYTER_PATH
JUPYTER_DATA_DIR
Runtime File
JUPYTER_RUNTIME_DIR
Summary
Chapter 4: Working with Python Frameworks
Python Frameworks Ecosystem at a Glance
Django Development
Installation
Creating a Project Environment for the Django Tutorial
Creating and Running a Minimal Django App
Creating the Django Project
Creating a Django App
Creating a Debugger Launch Profile
Exploring the Debugger
Using Definition and Peek Definition Commands
Using a Template to Render a Page
Serving Static Files
Readying the App for Static Files
Referring to Static Files
Using the Collectstatic Command
Creating Multiple Templates That Extend a Base Template
Creating a Base Page Template and Styles
Creating a Code Snippet
Working with Data, Data Models, and Migrations
Types of Databases
Migrating the Database
Creating a Superuser and Enabling the Administrative Interface
Flask Development
Creating and Running a Minimal Flask App
Running the App in the Debugger
Using Definition and Peek Definition Commands
Using a Template to Render a Page
Creating a Requirements.txt File for the Environment
Data Science–Specific Information and Tutorials
Setting Up a Data Science Environment
Preparing the Data
Training and Evaluating a Model
Summary
Chapter 5: Working with Containers and MS Azure
Integrating Azure for Your Python Projects
Key Azure Services
Computer Services
Identity
Azure Mobile Services
Storage Services
Data Management
Messaging Products
CDN
Management
Azure AI
Azure Blockchain Workbench
Creating a Function in Azure with Python Using Visual Studio Code
Deploying Docker Containers to Azure App Service
Using Containers in VS Code
Operating with Containers
Creating a Devcontainer.json File
Managing Extensions
Forcing an Extension to Operate Locally or Remotely
Forwarding or Publishing a Port
Temporarily Forwarding a Port
Personalizing with Dotfile Repositories
Summary
Index


📜 SIMILAR VOLUMES


Optimizing Visual Studio Code for Python
✍ Sufyan bin Uzayr 📂 Library 📅 2021 🏛 Apress 🌐 English

Learn Visual Studio Code and implement its features in Python coding, debugging, linting, and overall project management. This book addresses custom scenarios for writing programs in Python frameworks, such as Django and Flask.<div><br></div><div>The book starts with an introduction to Visual Studio

Optimizing Visual Studio Code for Python
✍ Sufyan bin Uzayr 📂 Library 📅 2021 🏛 Apress 🌐 English

Learn Visual Studio Code and implement its features in Python coding, debugging, linting, and overall project management. This book addresses custom scenarios for writing programs in Python frameworks, such as Django and Flask.<div><br></div><div>The book starts with an introduction to Visual Studio

Optimizing Visual Studio Code for Python
✍ Sufyan bin Uzayr 📂 Library 📅 2021 🏛 Apress 🌐 English

Learn Visual Studio Code and implement its features in Python coding, debugging, linting, and overall project management. This book addresses custom scenarios for writing programs in Python frameworks, such as Django and Flask.<div><br></div><div>The book starts with an introduction to Visual Studio

Python for Developers: Learn to Develop
✍ Mohit Raj 📂 Library 📅 2023 🏛 BPB Publications 🌐 English

Master python programming language in easy steps Key Features ● Start from basics of Python Control statement, loop structure, break, continue, and pass statement ● Detailed description of Python data types: string, tuple, list, and dictionary with the help of example ● Organizing code using fu

Python tools for Visual Studio leverage
✍ Cathy Wang, Martino Sabia 📂 Library 📅 2014 🏛 Packt Publishing 🌐 English

This is a hands-on guide that provides exemplary coverage of all the features and concepts related to PTVS. The book is intended for developers who are aiming to enhance their productivity in Python projects with automation tools that Visual Studio provides for the .Net community. Some basic knowled

Python Tools for Visual Studio leverage
✍ Wang, Cathy;Sabia, Martino 📂 Library 📅 2014 🏛 Packt Publishing 🌐 English

Leverage the power of the Visual Studio IDE to develop better and more efficient Python projects Overview Learn how you can take advantage of IDE for debugging and testing Python applications Enhance your efficiency in Django development with Visual Studio IntelliSense Venture into the depths of Pyt