Becoming a professional Python developer means knowing more than just the language. Once you make the transition from simple scripts to larger projects, it becomes important to know the tools of the trade and how to use them. This course introduces you to a set of standard tools. We'll see how to install and manage your project's dependencies and how to set up your development environment. Then we'll go into code quality, debugging and documentation. Finally, we'll see how to package and distribute the final product.
After years of working in software development, Reindert-Jan Ekker has
decided to pursue another passion of his: education. He currently
works as a college professor of Computer Science in the Netherlands,
teaching many subjects like web development, algorithms and data
structures and Scrum.
Introduction Hi, my name is Reindert-Jan Ekker and welcome to this course called The Python Developer's Toolkit. In this course we'll explore a number of tools that are likely used in the Python community and that every Python developer should know about. In this short introductory module I will go over two things, what can you expect from this course and what you should already know to be able to follow the course. The basic idea behind this course is to introduce you to a number of tools for tasks that occur in just about every real-world Python project, which by extension means that every serious Python developer should know these tools. I'm going to stick to standard tools. Most of the tools we'll learn about are either part of the standard Python installation or when they're not, most of time they're the most popular tool for that particular task and used by most large projects. And in some cases these tools are set to become the future official Python standards. So why is all of this important? Well, as a Python programmer you're not just using the Python programming language and interpreter, you're also using the standard library. And once your projects start to grow and become more complex you'll find that there's even more beyond that. There's a whole ecosystem of tools and best practices that you should learn about. And this course aims to help you along the way to becoming a well-rounded Python professional.
Managing Python Packages Hi, my name is Reindert-Jan Ekker and welcome to this module where we'll see how to manage Python packages. So this module is centered around Python packages and we'll see how to find packages in a central repository, and, of course, how to install and remove them. I'm also going to tell you a bit about all the tools that are available to you. Actually, there's quite a few and it can be overwhelming when you're new to all of this. So I'll tell you what the recommended tools are and which ones you should avoid. Now you should be aware that after watching this module, you don't actually know everything there is to know about packaging. Normally you'll want to set up your own separate environment for each project and install packages in there. So to get the complete picture be sure to watch the next module as well.
Isolated Development Environments With Virtualenv Hi, I'm Reindert-Jan Ekker and in this module I'll tell you how to create virtual Python environments for your projects. So I'll start with giving you a little background, explaining why virtualenv is necessary and what it does. And of course, we'll see how to create and remove virtual environments and how to use these environments when working on your projects. I'll also touch on some more advanced options for virtualenv. And finally we'll take a look at a wrapper around virtualenv that makes it a little more usable, called virtualenvwrapper.
Checking Your Code Quality With Pylint Hi, my name is Reindert-Jan Ekker and in this short module I want to show you a nice utility to help improve your code quality. You can make your life as a Python developer a lot easier if you know some tools that will help avoid some common pitfalls in your code, like when you accidentally mistype the name of a variable. And to make sure your code is consistent, and clear, and readable, you can also have it check whether you're following the standard Python code style. So in this module I will first introduce you to Python's standard code style as defined in a document called PEP8. And then we'll look into a code checking tool called Pylint.
The Python Debugger I'm Reindert-Jan Ekker and in this module we'll look at the standard tools available for debugging your Python code. Python comes with a module to help debug your code and it's called pdb, The Python Debugger. We'll examine how to use it interactively while your program runs so you can inspect the state of your program while you step through each line of code as it is executed. And you can even make changes and see what the effect will be. Now most of this module we'll spend on the command line again because that way you interact with the debugger directly. And using the debugger from a command line is a skill that's very helpful in cases where you don't have the luxury of using a graphical user interface. Like for example, when you have to work remotely over an SSH connection. But of course, there are many IDEs that provide a graphical user interface for Python debugging as well. And we'll have a short look at that too.
Documenting Your Code With Sphinx Hi, I'm Reindert-Jan Ekker and in this module we'll see how to generate beautiful code documentation with a tool called Sphinx. So let's say your first project is nearing completion, and it's a library that you mean to be used by others in their projects. Now for them to be able to easily use it you have to have readily accessible documentation that's easy to read and to search. To make the task of documenting your code easier I'll show you the toolkit used by most large Python projects to maintain their documentation and to generate documents in multiple formats like PDF and HTML. We'll start by taking a short look at Python docstrings and the standard conventions for writing them. Then I'll introduce you to Sphinx, a tool that can generate nice HTML documentation. Sphinx is used to generate the documentation for the Python language in standard library, and it's a de-facto standard tool in the Python world. Among other things, it will transform the docstrings in your code to beautiful HTML. Now Sphinx also uses a markup format called reStructuredText for laying out text, and we'll look at that as well.
Packaging and Distributing Your Project Hi, my name is Reindert-Jan Ekker, and welcome to this last module of this course in which you'll see how to package and distribute your projects. So in this course we've seen how to install the packages your project depends on, how to set up your virtual development environment, how to check your code quality, debug, and document your code. And hopefully at some point, your project will be ready for shipping. So let me tell you about some of the ways you might do that. First we'll see that it's really easy to package your project with a toolset called setuptools. Then after packaging you can share your project with the world by uploading it to the PiPy package repository. Finally I'll give you a brief overview of what the possibilities are when you want to distribute your project as a standalone executable.