# Python Click Part 1 of 4

## Метаданные

- **Канал:** AssemblyAI
- **YouTube:** https://www.youtube.com/watch?v=Ha-6cL2gUrY
- **Дата:** 09.08.2021
- **Длительность:** 2:13
- **Просмотры:** 2,839
- **Источник:** https://ekstraktznaniy.ru/video/13368

## Описание

The first part in a four part series on Python Click. Click is a library for creating command line interfaces in Python. This part of the tutorial shows how to do the basics of creating your group command in Click.

Full text guide here - https://www.assemblyai.com/blog/the-definitive-guide-to-python-click

## Транскрипт

### Segment 1 (00:00 - 02:00) []

yo what up um we're gonna go through how to use the python click library today and so i'm gonna break this down into six steps that kind of go over most of the important commands that you'll need to use and click so the first thing we're going to do is like create a group which is um it's a click command that essentially creates a group of commands that you run when it's when the script is executed so what we're going to do is we're going to do it at click. command and we'll give this oh sorry click. group a name we can give it any name let's give it uh example um and then we'll just do def example and then so when you add this like the comment like the multi-line python comments into click it automatically turns it into like a descriptor of the group or the command so an example click project all right and then we'll create a main function that will uh run example with program name equal to uh example and then if name equals oops if name equals main i think oh yeah i forgot oh no there we go that should be right all right so now when we run um python example dot pi oh sorry click walk through is what i actually called it walk through click what i call this file walk through click okay walk through click dot pi um we should see a little description on how to use this so usage example so obviously yeah in order to actually just use it as an example you have to aliase it but you can see the comment that shows up here an example click project and yeah so that's the first part and then i'm going to pause and then create the next part
