Python command line tools course. (Pragmatic AI Solutions, 2022)
Python Command Line Tools Course This is a full Python CLI course that will take you from the most basic approaches to command line tools in Python to the more advanced featuers that use frameworks like argparse and Click. Everything on this course is available in the course Repository on GitHub, so that you can follow the examples closely and use that as a foundation with all examples and sample files. Building a CLI is the foundation for automation in your daily work By the end of the course you should feel confident in creating a tool, and the following: Create simple CLI tools without any frameworks Learn about arguments, flags, help menus and how to create them automatically Use the argparse framework to build more complex tools Build a CLI with the Click framework Use special features of Click like colored output and argument types Modularizing and project scaffolding in Python Packaging and packaging files in Python How to create tests and run them automatically Continuous Integration and Continuous Deployment with Github Actions for Python Packaging a CLI tool with an executable Distributing a CLI tool on PyPI (the Python Package Index) How to automatically test your project on a PR (GitHub pull request) How to automate publishing your tool to PyPI on a release We'll cover 3 different ways to create tools, from the very basic (with sys.argv) to using a framework that comes with Python ( argparse), and finally the more involved, by using an external library like Click. This flexibility is essential because it will let you decide when to use a simple single file with no dependencies to a fully featured framework like Click. Then you will learn about the project layout, modularizing and organizing your code in directories and files while keeping everything useful for a CLI. You will test your code using Pytest and then package your code using Python packaging files and tools. You will continue by automating everything, including the testing and linting using GitHub Actions, and finally publishing your project to the Python Package Index so that it can be installed by anyone in the world. Course Resources Course Repository on GitHub Build Python applications from scratch.