I love the simplicity of using the decorators you've provided. So much easier to use than argparse, and you get the help formatting features, too. Many thanks!
That's really cool. It looks remarkably clean and easy to work with. a lot of little utilities I've done have kinda nasty argument handling, and this really seems like it'd clean things up
What about if I would like to use normal python params in conjunction with click params ? Let's say that I want to use the same function that I provide click.param, but in another piece of code I call that same function though provide another method (non click method), how could this be achieved ?
Thank you for this video. I just follow your way and pip install goes ok. But if i import a module from a package of !y own project directory, i get that, error: no commands supplied. If i do that from inside of a function (who is decorate by click.command), i also get an error and click doesn't works. It is unusable if people can no more import there own packages from there own project directory when they use Click. I think i missed an information... could you tell me ?
I love this, Arwid! Thanks. I'm new to Python so sorry if this is a daft question: is it possible/sensible to use Click to parse and dispatch commands entered into an Urwid text entry widget? Or would that be using a sledgehammer to hit a mallet to crack a nut?
@@alice_in_wonderland42 Some people finding video based tutorials easier to follow. I sympathise with the OP, I see potential of Click, but his usage of setuptools is confusing (no, its not something I'm familiar with)
@@EViL3666 I think Armin could have left out the setuptools part. Some people begin a project that way. I'm sure there's an argument for doing so, but I can't be bothered. If you're not going to "ship" the app, I don't see the point.
In the set-up file, you can see that he writes something like this: entry_points = ''' [console_scripts] hello = hello:cli This basically says that set hello as a command, corresponding to the hello.py script and the command should start execution from the function called cli in the script (hence, entry_points). Since there was no cli() function defined in the hello.py script, we got an error.
when installing the package with "pip install -e ." It will read setup.py and check in the entry_points=[] info hello_output = hello_codefile:cli is read as: "Create an entrypoint: hello_output.exe #I'm on windows hello_output.exe will consume hello_codefile.py and execute cli()" hello_output.exe won't be created until you run: "pip install -e ." It will be in dist/hello_output.exe In this example case it is: hello.exe is created, reads from hello.py, and runs cli() Also means you can 'install' this and create the hello_output.exe executable once, and then you can edit hello_codefile.py and re-run hello_output.exe to observe changed behavior without needing to rebuild hello_output.exe cheers
Using click right now for the first time and its awesome! So is Flask, so is Jinja, so is whatever you're working on next :D. Quick question -- can you upload your .bashrc somewhere? I'm really digging the prompt.
watched this and was like, wow, he seems like a pretty good programmer. Or perhaps he's just mediocre by most standards and I'm a bad programmer. Later I found out he invented flask-restless and now I feel better about myself :)
It should be taken as a compliment: if you think he is showing that's because you're impressed with his skills :-) But vim wizards do not use their mouse. I'm 0:52secs into the video and the author is already moving his mouse everywhere.
+Louis Burke It's probably just me, being wierd, but for some reason I like the sound of people typing... Please don't scream at me I'm not trying to sound ignorant, disrespectful etc.
I usually can't watch programming tutorials but damn. This guy knows how to keep my attention.
I love your tempo! Straight to the problem, fast answers, upgrading the program by tiny steps. Yummy! ✓
I love the simplicity of using the decorators you've provided. So much easier to use than argparse, and you get the help formatting features, too. Many thanks!
I cannot find any documentation on how to use the "entry_points" feature of the setup.py file. Can you please direct me to the api documentation?
Thanks for the video, definitely helped get me up to speed with click very quickly!
I want more! Thank you for recording this, the amount of examples available for Click are VERY scarce (especially video examples).
Great work with Click, Armin!
Thanks for taking the extra time in filming also this tutorial :)
This was fantastic. Also your speed inspiring
i'm shocked that i have just watched the whole video, you explained it very well, thank you!
I was thinking to write a cli library in python with routing inspired by flask and then a week ago I discovered that Armin already did it. Thanks!
Great tutorial, very interesting, thanks! I learned a lot and I'm looking forward to using Click.
great outline! Thanks! One question, what do you use for your command line. love the info above your cursor.
Great video, quick and to the point!! A pleasure to watch.
Wow, this is what i need. Glad I found it! Thank you! 👍👍👍
Would you like to share your settings for vim and the osx terminal? :)
That's really cool. It looks remarkably clean and easy to work with.
a lot of little utilities I've done have kinda nasty argument handling, and this really seems like it'd clean things up
What about if I would like to use normal python params in conjunction with click params ? Let's say that I want to use the same function that I provide click.param, but in another piece of code I call that same function though provide another method (non click method), how could this be achieved ?
Great stuff. I should get back into using this library.
What if you want a sub-command to be "account:login". How would you define that with click?
This is the author of the flask framework. Why are the comments so ungrateful ?
Thank you for this video. I just follow your way and pip install goes ok.
But if i import a module from a package of !y own project directory, i get that, error: no commands supplied.
If i do that from inside of a function (who is decorate by click.command), i also get an error and click doesn't works.
It is unusable if people can no more import there own packages from there own project directory when they use Click. I think i missed an information... could you tell me ?
Very helful. Thanks a lot!
save me hours of reading docs, thank you so much!
Great concise/clear video and guide. Love the tools you make, great work
This is a real quick help to get started with. Thankyou!!
Impressive ! I was planning to use docopt but i prefer using click. Much more intuitive :) Thanks
Great video. I hope you'll make more showing us more tricks with click. How about a series on pipsi as well?
Awesome Video, great job.
I just find you now guy amazing tool to use in terminal
Can someone give the python3 version of this example? I get errors when using the make_pass_decorator in py3
what's the font you are using?
please something else like this because this was awesome and useful!
I love this, Arwid! Thanks. I'm new to Python so sorry if this is a daft question: is it possible/sensible to use Click to parse and dispatch commands entered into an Urwid text entry widget? Or would that be using a sledgehammer to hit a mallet to crack a nut?
Thanks for creating this video
Wow. Top video!
What kind of shell is that?
Is there anything like this for Ruby?
thor and commander
Your zsh config is nice. Could you send me your .zshrc? If not, what's the theme and how did you get the workon "virtualenv"? Thanks for the tutorial
why dont you upload complete tutorial series?? it would be of great help dude!
why can't you read the complete documentation?? it will help you.
@@alice_in_wonderland42 Some people finding video based tutorials easier to follow. I sympathise with the OP, I see potential of Click, but his usage of setuptools is confusing (no, its not something I'm familiar with)
@@EViL3666 for most of the libraries u don't have any video tutorials, but they have great documentation.
@@alice_in_wonderland42 Very true.
@@EViL3666 I think Armin could have left out the setuptools part. Some people begin a project that way. I'm sure there's an argument for doing so, but I can't be bothered. If you're not going to "ship" the app, I don't see the point.
Beautiful!
Very nice, thank you very much :)
If y'all didn't know, he created the library lol
Thanks, somehow click didn't click until watching this.
Hey thanks, just the info i needed !!
+Armin Ronacher What shell do you use? zsh?
Do you have a email of a way I can contact you? python advice? pay?
I don't get it. Is cli a keyword? why did we get error??
In the set-up file, you can see that he writes something like this:
entry_points = '''
[console_scripts]
hello = hello:cli
This basically says that set hello as a command, corresponding to the hello.py script and the command should start execution from the function called cli in the script (hence, entry_points).
Since there was no cli() function defined in the hello.py script, we got an error.
when installing the package with
"pip install -e ."
It will read setup.py and check in the entry_points=[] info
hello_output = hello_codefile:cli
is read as:
"Create an entrypoint: hello_output.exe #I'm on windows
hello_output.exe will consume hello_codefile.py
and execute cli()"
hello_output.exe won't be created until you run:
"pip install -e ."
It will be in dist/hello_output.exe
In this example case it is:
hello.exe is created, reads from hello.py, and runs cli()
Also means you can 'install' this and create the hello_output.exe executable once,
and then you can edit hello_codefile.py and re-run hello_output.exe to observe changed behavior without needing to rebuild hello_output.exe
cheers
what is your PS1?
8 years old. How about an update using Python 3 and Poetry?
He created Flask.
Useful lib! Thanks for that. Just offtopic: could you post your .vimrc and $PS1?? They look great!
github.com/mitsuhiko/dotfiles
Sold
Using click right now for the first time and its awesome! So is Flask, so is Jinja, so is whatever you're working on next :D. Quick question -- can you upload your .bashrc somewhere? I'm really digging the prompt.
So cool
watched this and was like, wow, he seems like a pretty good programmer. Or perhaps he's just mediocre by most standards and I'm a bad programmer. Later I found out he invented flask-restless and now I feel better about myself :)
Yeah I also felt pretty bad about my programming skills watching this.
Great video but slowing down would have been nice. No need to go at the speed of light there.
thanks!!!
nice, but next time could u speak louder please, the audio kinda small
looks like you are showing off your vi editor skills than tutor click
If he was showing of he wouldn't have quit vim every time he wanted to run a shell command ;)
:! hello
Andrew Sanchez I didn’t know that, thanks bro
pretty sure there was much more to learn but you couldn't look past the editor
Spacemacs.org
It should be taken as a compliment: if you think he is showing that's because you're impressed with his skills :-)
But vim wizards do not use their mouse. I'm 0:52secs into the video and the author is already moving his mouse everywhere.
Talks fast, not enough pictures...
Damn are you typing with your mind 😅
do you have something visual to understand calls instead of so much textual explanation? please keep in mind you are not explaining to pros.
i thought i was watching this video at 1.5X but it was 1.0X
Way to fast.. Are you trying to catch a bus?
I think this is the pace of his thinking :)
Thank god we can replay it or pause it.
I like the tempo. hint: YT allows you to set different speed of the playback - check the settings
too*
The sound of your keyboard is extremely annoying.
Whats click?
It's a framework for building command line interfaces
+Louis Burke It's probably just me, being wierd, but for some reason I like the sound of people typing...
Please don't scream at me I'm not trying to sound ignorant, disrespectful etc.
+James O'Shaughnessy xD( After The sound of your keyboard is extremely annoying
No screaming shall be done I just think it's poor from a video editing POV
You are not a great teacher!! Are you trying to show us how good you are?
I thought the video was excellent. A great student will learn even when the teacher doesn't fulfill their desires :)
Did you consider you might not be a very good student.