Takuya Futatsugi - Bringing your Python script to more users!

Conference: EuroPython 2020

Year: 2020

"Bringing your Python script to more users! EuroPython 2020 - Talk - 2020-07-23 - Ni Online By Takuya Futatsugi It is wonderful to automate boring stuffs with Python. In Japan, new introductory books are being published every month and more and more Pythonistas are working on automation. A Python script that is useful to you may be useful to others. So I talk about how to enable others to use your script. In this talk, I use a simple script which can reduce the width and the height of a specified image in your computer. I assume someone who's read the introductory book can understand the script. First, I introduce Command Line Interface (CLI) to solve hardcoding in the sample script. After implementing CLI, you don't need to edit the script. Second, I introduce Grafical User Interface (GUI) to make the script more user-friendly. Finally, I introduce web application so that users can the script without installation. All users have to do is connecting the Internet! The timeline is supposed to be the following: h1Introduction (3min)/h1 self-introduction motivation of this talk sample script (pathlib, Pillow) h1CLI (5min)/h1 problem: need to edit the script introduce argparse module (pass target file path from command line) about positional arguments and optional arguments check whether a path points an existing file (type parameter of add_argument()) h1GUI (9min)/h1 problem: CLI is not easy to handle than GUI introduce eel eel's elements: HTML, CSS, JavaScript hello world in eel file access in eel app convert sample script to eel app (user can see which image is specified as target😃) how to distribute h1Web app (9min)/h1 problem: Users need to install introduce Web app server / client actually eel's elements are used in web app (we can recycle codes) introduce Flask hello world in flask static files in web app how to deploy (heroku) h1wrap up (1min)/h1 h1Q&A (3min)/h1 License: This video is licensed under the CC BY-NC-SA 3.0 license: https://creativecommons.org/licenses/by-nc-sa/3.0/ Please see our speaker release agreement for details: https://ep2020.europython.eu/events/speaker-release-agreement/ "