Working with Command Line using Python!
priyankasaggu119 |
Description:
The command line is where the rubber hits the road.
The session will broadly talk about how to interact with systems and shell environments from within Python. Further expanding to writing command line tools using Python, from (almost) scratch to building them using feature-loaded Python modules.
The following is the outline around topics to be covered during the talk:
- Working with the Shell
- Talking to the Interpreter with the
sys
module. - Dealing with the Operating System using the
os
module. - Spawn processes with the
subprocess
module.
- Talking to the Interpreter with the
- Basic introduction to Python function decorators & Classes.
- Creating Command-Line Tools
- Using
sys.argv
. - Using
argparse
. - Using
click
. - Using
fire
. - And finally, implementing Plug-ins.
- Using
Prerequisites:
- Basic knowledge around Python that includes stuffs like:
- importing modules with
import
command. - writing
if/else
conditionals - writing
while
andfor
loops. - and that's pretty much all...
- importing modules with
- Basic understanding around linux shell commands.
- For getting started: https://lym.readthedocs.io/en/latest/
Video URL:
https://youtu.be/1FOecXfqFdk
Content URLs:
The talk will be based on the topics talked about in the following two blogposts (written by me):
Speaker Info:
Priyanka Saggu is a DevOps engineer, currently working at a dataOps organisation, Atlan. She's having an years long experience dealing with highly distributed infrastructure on hybrid cloud platforms, and writing fully automated product releases. She's also an Outreachy'19 alumna under GNOME Foundation.
Speaker Links:
- Blog: https://priyankasaggu11929.github.io/
- GitHub: https://github.com/priyankasaggu11929
- GitLab: https://gitlab.gnome.org/priyankasaggu119
- Twitter: https://twitter.com/PriyankaSaggu4
- Linkedin: https://www.linkedin.com/in/priyanka-saggu/