Details

Visual Studio Code for Python Programmers


Visual Studio Code for Python Programmers


1. Aufl.

von: April Speight

32,99 €

Verlag: Wiley
Format: PDF
Veröffentl.: 04.06.2021
ISBN/EAN: 9781119773382
Sprache: englisch
Anzahl Seiten: 256

DRM-geschütztes eBook, Sie benötigen z.B. Adobe Digital Editions und eine Adobe ID zum Lesen.

Beschreibungen

<p><b>Become proficient and efficient with Visual Studio Code and learn how to integrate all your external tools!</b></p> <p><i>Visual Studio Code for Python Programmers</i> 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.</p> <p>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.</p> <ul> <li>Introduces you to the features of the Visual Studio Code workspace and how those features can be customized</li> <li>Demonstrates how Visual Studio Code allows you to choose your structure according to your needs</li> <li>Covers editing code in Python, including syntax highlighting, code completion, object definition, refactoring, and code navigation</li> <li>Describes Git integration and how to perform common Git functions (commits, checkouts, branches, and merges) from within Visual Studio Code</li> <li>Highlights debugging features for Python developers</li> </ul>  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.
<p>Introduction xix</p> <p><b>Part I Welcome to Visual Studio Code 1</b></p> <p><b>Chapter 1 Getting Started 3</b></p> <p>Installing Visual Studio Code 4</p> <p>The Visual Studio Code User Interface 4</p> <p>Activity Bar 5</p> <p>Side Bar 6</p> <p>Editor 7</p> <p>Panels 11</p> <p>Status Bar 12</p> <p>Command Palette 12</p> <p>Extensions 14</p> <p>Customizations 15</p> <p>Settings 16</p> <p>Color Themes and Icons 18</p> <p>Keybindings 18</p> <p>Display Langage 18</p> <p>Summary 19</p> <p><b>Chapter 2 Hello World for Python 21</b></p> <p>Installing a Python Interpreter 21</p> <p>macOS 22</p> <p>Linux 22</p> <p>Windows 22</p> <p>Installing the Python Extension for Visual Studio Code 22</p> <p>Creating a Python File 23</p> <p>Selecting an Interpreter 24</p> <p>Setting a Default Interpreter 26</p> <p>Settings Editor 26</p> <p>settings.json File 26</p> <p>Selecting a Linter 26</p> <p>Editing a Python File 27</p> <p>Running a Python File 29</p> <p>Workflow Recap 30</p> <p>Summary 31</p> <p><b>Chapter 3 Editing Code 33</b></p> <p>Quick Fixes 34</p> <p>Code Completion, Definitions, and Declarations 35</p> <p>Formatting 38</p> <p>Edit Formatting Settings in the Settings Editor 39</p> <p>Edit Formatting Settings in settings.json 40</p> <p>Linting 41</p> <p>Enable and Disable Linting 41</p> <p>Run Linting 42</p> <p>Linting Settings 43</p> <p>Refactoring 44</p> <p>Extract Variable 44</p> <p>Extract Method 45</p> <p>Sort Imports 46</p> <p>Snippets 47</p> <p>Summary 48</p> <p><b>Part II Additional Visual Studio Code Features 51</b></p> <p><b>Chapter 4 Managing Projects and Collaboration 53</b></p> <p>Files and Folders 53</p> <p>Open a Project 54</p> <p>Navigate Files 56</p> <p>Search across Files 57</p> <p>Close a File or Folder 60</p> <p>Environments 60</p> <p>Virtual Environments 61</p> <p>Conda Environments 61</p> <p>Source Control 63</p> <p>Initialize a Repository 65</p> <p>Commit Changes 66</p> <p>Branches 69</p> <p>Remotes 70</p> <p>Gutter Indicators 71</p> <p>View Diffs 71</p> <p>Push and Merge Commits 73</p> <p>Pull Requests 74</p> <p>Live Share 74</p> <p>Install Live Share 75</p> <p>Sign In to Live Share 76</p> <p>Share a Project 76</p> <p>Join a Session 78</p> <p>Editing and Collaboration 80</p> <p>Follow a Participant 80</p> <p>Share a Terminal 81</p> <p>Summary 82</p> <p><b>Chapter 5 Debugging 83</b></p> <p>Starting a Debug Session 84</p> <p>Debug Commands 89</p> <p>Continue 89</p> <p>Step Over 90</p> <p>Step Into 90</p> <p>Step Out 91</p> <p>Stop 91</p> <p>Restart 92</p> <p>Call Stack 92</p> <p>Triggering a Breakpoint 93</p> <p>Logpoints 95</p> <p>Watch 96</p> <p>The Debug Console 98</p> <p>Launch Configurations 101</p> <p>Summary 104</p> <p><b>Chapter 6 Unit Testing 105</b></p> <p>Enable and Discover Tests 105</p> <p>Run Tests 109</p> <p>Debug Tests 113</p> <p>Summary 115</p> <p><b>Chapter 7 Jupyter Notebook 117</b></p> <p>Creating and Opening a Jupyter Notebook 118</p> <p>Code Cell Modes 120</p> <p>Adding Cells 121</p> <p>Editing Cells 122</p> <p>Running a Cell 124</p> <p>Running a Single Cell 124</p> <p>Running All Code Cells 124</p> <p>Running Cells Above and Below a Code Cell 125</p> <p>Additional Commands 126</p> <p>Viewing Variables and Data 126</p> <p>Viewing Plots 128</p> <p>Debugging a Jupyter Notebook 129</p> <p>Connecting to a Remote Server 130</p> <p>Exporting a Notebook 131</p> <p>Summary 132</p> <p><b>Chapter 8 Using Git and GitHub with Visual Studio Code 135</b></p> <p>Getting Started 135</p> <p>GitHub Pull Requests and Issues Extension 136</p> <p>Publish a Project to GitHub 139</p> <p>Push Changes to GitHub 141</p> <p>Manage Pull Requests and Issues 143</p> <p>Pull Requests 144</p> <p>Issues 147</p> <p>Clone Repository 152</p> <p>Timeline View 154</p> <p>Summary 156</p> <p><b>Chapter 9 Deploy a Django App to Azure App Service with the Azure App Service Extension 157</b></p> <p>Getting Started 157</p> <p>Creating a Django Project 159</p> <p>Creating an App 161</p> <p>Creating a Home Page 163</p> <p>Creating Website Pages 166</p> <p>Deploying to Azure 168</p> <p>Summary 175</p> <p><b>Chapter 10 Create and Debug a Flask App 177</b></p> <p>Getting Started 177</p> <p>Create a Flask App 178</p> <p>Create and Render a Template 180</p> <p>Debug the Flask App 184</p> <p>Summary 187 </p> <p><b>Chapter 11 Create and Deploy a Container with Azure Container Registry and Azure App Service 189</b></p> <p>Getting Started 189</p> <p>Create a Container 191</p> <p>Add Docker Files to the Project 191</p> <p>Build an Image 193</p> <p>Build and Run a Container 195</p> <p>Debug a Container 197</p> <p>Push an Image to the Registry 197</p> <p>Create an Azure Container Registry 198</p> <p>Determine the Image’s Registry Location 199</p> <p>Deploy the Container Image to Azure 201</p> <p>Make Changes to the App and Deploy 205</p> <p>Multicontainer Apps 206</p> <p>Summary 207</p> <p><b>Chapter 12 Deploy an Azure Function Trigger by a Timer 209</b></p> <p>Getting Started 210</p> <p>Create an Azure Function 211</p> <p>Invoke the Function Locally 213</p> <p>Add the Code to the Function 214</p> <p>Deploy the Function to Azure 215</p> <p>Summary 220</p> <p><b>Appendix Getting Started with Azure 221</b></p> <p>Index 225</p>
<p><b>APRIL SPEIGHT</b> is a developer who specializes in Python and conversational design for chat bots and AI Assistants. Her passion for learning and teaching Python led to her first published title, <i>Bite-Size Python: An Introduction to Python Programming</i>. She currently works on content creation and developer community engagement for Spatial Computing and Mixed Reality at Microsoft.
<p><b>MASTER VISUAL STUDIO CODE AND CUSTOMIZE IT TO MEET YOUR UNIQUE NEEDS</b> <p>Visual Studio Code offers a robust source code editor and development environment. It’s a free download that’s fast, lightweight, and available for Windows, Mac, and Linux. Along with support for IntelliSense, refactoring capabilities, and an extensive ecosystem of extensions, it also offers debugging support. Once you master it, you can open a Python project from within Visual Studio Code and get end-to-end execution and debugging functionality. <p>Arranged in three parts, this guide helps Python developers become not just familiar with Visual Studio Code, but productive in its use. Part 1 gets you started with the steps for installing Visual Studio Code, installing the Python extension, and exploring the editing features of the workspace. Part 2 examines the Python extension essentials, covering editing Python code, debugging, using snippets, and testing, as well as the integration Visual Studio Code provides to external tools like Git. Part 3 takes you into real world applications, featuring integration with Jupyter Notebook, GitHub, Django, Flask, Docker, and Azure. <p><b>You’ll be ready to hit the ground running as you learn to:</b> <ul><li><b>Use all the features of the Visual Studio Code workspace</li> <li>Customize those features for your needs</li> <li>Choose the structure for your project</li> <li>Edit code in Python, including syntax coloring, IntelliSense, refactoring, and code navigation</li> <li>Perform common Git functions from within Visual Studio Code</li> <li>Debug your code using JSON</b></li></ul>

Diese Produkte könnten Sie auch interessieren:

Domain Architectures
Domain Architectures
von: Daniel J. Duffy
PDF ebook
31,99 €