Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please refer to our video player troubleshooting guide for assistance.

Getting Started With Developing

00:00 I’m Ian Currie, a Real Python team member, and I’m with another team member here. Hi, everyone. I’m Geir Arne Hjelle, also with Real Python. Our starting point here is that we have a little CLI app that will basically echo whatever I pass into it. I pass it in a message, Sleep tight, little man-cub, and then a snake says to me Sleep tight, little man-cub.

00:25 If we go over to the code for this,

00:29 the entry point file, cli, which is the one we called, is just taking the arguments that were passed in. The arguments in this case are Sleep tight, little man-cub, and it’s calling a say() function from the snake module. The snake module looks like this.

00:52 We’ve got our snake drawing, ASCII art.

00:56 We’ve got a bubble() function, which will contain the message in a speech bubble. Here you can see the top of the speech bubble, the sides of the speech bubble, and the bottom of the speech bubble.

01:11 And finally, you have the say() function, which you call from the cli module, which will print a bubble and print the snake. So it looks like that the snake is saying this message.

01:24 All right, so currently the structure of this project that we have is just a cli file, which takes the arguments from the command line and feeds them into this say() function from the snake module.

01:39 We don’t have this contained in any folders apart from the REALPYTHON folder, which is just a general working folder. You can ignore the __pycache__ and the .vscode.

01:48 The .vscode just contains some settings to make the text bigger for this recording. So, what we want to do is start to package this all together.

01:59 And again, packaging is not just for putting things onto PyPI, but also just to make your life easier. So, Geir Arne, how do we get started with packaging?

Become a Member to join the conversation.