├── banner.svg ├── LICENSE └── README.md /banner.svg: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | Duke University 11 | 12 | 13 | 14 | 15 | Python and Rust for Linux Command Line Tools 16 | 17 | 18 | 19 | coursera 20 | 21 | 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Alfredo Deza 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [![Coursera Course](./banner.svg)](https://insight.paiml.com/nvd "Coursera Course") 2 | 3 | # Python and Rust CLI tools course 4 | 5 | This is the Introduction to Command-line tools with Python and Rust course. You'll learn several techniques and tools to build powerful command-line tools in both Python and Rust. From the fundamentals to more robust best-practices and advanced topics, you'll be able to start automating your daily tasks and build your own CLI tools. 6 | 7 | Building command-line tools to automate and simplify workflows is a foundational principle of DevOps. Regardless of your expertise in either Python or Rust, you'll be able to build on the examples in this course. This course does not require you to be an expert in either languages, and most examples can be adapted to your own needs. 8 | 9 | 💡 Are you just looking for a 👉 [Rust template](https://github.com/alfredodeza/rust-template) to get started easily with a project? The [template](https://github.com/alfredodeza/rust-template) has everything you need! 10 | 11 | This is part 1 of the Python and Rust CLI tools course. There are 2 weeks in total: 12 | 13 | - [1: Resources](https://github.com/alfredodeza/python-and-rust-tools) 👈 You are here! 14 | - [2: Python CLI](https://github.com/alfredodeza/python-cli-example) 15 | - [3: Rust CLI](https://github.com/alfredodeza/rust-cli-example) 16 | - [4: Python Advanced CLI](https://github.com/alfredodeza/advanced-python-cli) 17 | - [5: Rust Advanced CLI](https://github.com/alfredodeza/advanced-rust-cli) 18 | 19 | 20 | 🚀 **Watch the Video course** 21 | 22 | [![O'Reilly](https://learning.oreilly.com/covers/urn:orm:video:28037639VIDEOPAIML/400w/)](https://learning.oreilly.com/videos/devops-command-line-tools/28037639VIDEOPAIML/ "Python and Rust CLI tools") 23 | 24 | 25 | ## Learning Objectives 26 | 27 | 1. Generate functional command-line tools in both Python and Rust. 28 | 1. Develop complex command-line tools by adding sub-commands, flags, and environment variables. 29 | 1. Design and implement Linux-style command-line tools. 30 | 1. Package and distribute command-line tools for use by others. 31 | 1. Apply testing methods to validate the behavior of command-line tools 32 | 33 | ## Prerequisites 34 | The course will use [Visual Studio Code](https://code.visualstudio.com/?WT.mc_id=academic-0000-alfredodeza) as the editor of choice. You can use any editor you like, but the course will focus on VSCode. These are the extensions you'll need to install: 35 | 36 | - [Visual Studio Code](https://code.visualstudio.com/?WT.mc_id=academic-0000-alfredodeza) 37 | - [Python extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-python.python&WT.mc_id=academic-0000-alfredodeza) 38 | - [GitHub Copilot](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot&WT.mc_id=academic-0000-alfredodeza) 39 | - [Rust Analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer&WT.mc_id=academic-0000-alfredodeza) 40 | 41 | For Python, I recommend you use your system Python as long as it is newer than 3.6, and that you use the Python `venv` module for virtual environments (the course will go into details on how to do this). For Rust you'll need to install the [Rust toolchain](https://rustup.rs/). 42 | 43 | This course uses [GitHub Copilot](https://copilot.github.com/) and [GitHub Codespaces](https://github.com/features/codespaces) which in turn uses Visual Studio Code. Using Copilot and Codespaces creates a normalized way to develop and allows you to learn while you practice using generated suggestions. 44 | 45 | ## Week 1: Introduction to Command-line tools 46 | This week you'll learn the basics of command-line tools, and how to build a simple tool in Python and Rust. These are the repositories you should use as a reference: 47 | 48 | - [Python CLI examples](https://github.com/alfredodeza/python-cli-example) 49 | - [Rust CLI examples](https://github.com/alfredodeza/rust-cli-example) 50 | 51 | ## Week 2: Advanced Command-line tool development 52 | 53 | In this week, you'll build on the basics of CLI tools and add more complex flags with values and sub-commands. 54 | 55 | - [Advanced Python CLI](https://github.com/alfredodeza/advanced-python-cli) 56 | - [Advanced Rust CLI](https://github.com/alfredodeza/advanced-rust-cli) 57 | --------------------------------------------------------------------------------