Data Scientist
Tokyo, Japan
How to automate PyCon staff activities with Python! ~In PyCon JP staff activities, I automated operation about Slack and Google Drive using AWS~
View
- In 2016, started a career as a software engineer
- In 2017 Autumn, started Python as a hobby
- from 2019, engaged in Natural Language Processing at Uzabase, inc. Tokyo, Japan
- PyCon JP 2019, 2020 staff
- translate [Django Girls Tutorial](https://tutorial.djangogirls.org/ja/) into Japanese
---
Presentation in past conference
- 2019/05 Django Congress 2019 (45min) Django Girls Blogのネクストステップ (YouTube)
- 2019/09 PyCon JP 2019 (15min) Anaconda環境運用TIPS (YouTube)
- 2020/02 PyCon mini Shizuoka (30min) Djangoで始めるWeb開発の世界
-
How to automate PyCon staff activities with Python! ~In PyCon JP staff activities, I automated operation about Slack and Google Drive using AWS~
Description
This talk is case studies about automation with Python in PyCon Japan staff activities.
I will give this talk in English for 30 minutes.
In the PyCon JP staff activities, we use a lot of tools such as Slack and Google Drive.
I introduce two examples of how Python solved some of the things that I felt were not cool with the tool.
Target Audience
Intermediate User
(I will introduce several third-party packages in this talk, so beginners might feel difficult to understand)
This talk requires experience of writing automation scripts in Python, using some kind of package.
It would be more understandable if you have experience of automating the staff about Slack or Google Drive with Python, which I handle in talks, but not required.
Knowledge about the staff of PyCon JP will be supposed to be unnecessary.
Audience take-away
- How to post a message to Slack with Python
- How to do the above regularly using AWS Lambda
- How to manipulate Google Drive documents with Python
- A series of ways to manipulate Google Drive documents from Slack (via Python scripts deployed on AWS)
- Knowledge of what the PyCon JP staff is doing
Detailed Description
The first is an example of a reminder feature in Slack that's not cool.
Slack's reminder feature enables us to post a specified message at a specified time repeatedly, but we have to stop it manually.
It was annoying for me to have to remember when to stop, so I created a reminder which can end automatically.
It is a Python script that reads a Google spreadsheet and posts messages within a period when a reminder is needed.
I used AWS Lambda and CloudWatch Events, which are free to use for this purpose, as an environment to run Python script regularly.
The second is an example of automated preparation of the minutes for each staff meeting.
I felt that it was not cool to copy a template Docs in Google Drive manually each time.
So I made it possible to copy the Google Docs specified with the Python script.
I wanted to launch the script via Slack, so I placed it in AWS Lambda and prepared a URL to kick the script with Amazon API Gateway.
Slack's Slash command will call the URL.
time slot organization
- Introduction (5min)
- self-introduction
- introduce the activities of the PyCon JP staff
- What I saw as the Issues
- Example 1: Customized Slack reminder (11min)
- introduce Slack's reminder feature
- Create a reminder which can end automatically
- how to post messages to Slack with Python (urllib)
- how to read Google spreadsheets with Python (authlib, gspread)
- Introduce AWS Lambda and CloudWatch Events
- how to deploy on AWS Lambda and avoid pitfalls
- Example 2: Slack command to copy template Google Docs (11min)
- Preparation for staff meetings
- copy the minutes template with a Python script
- how to copy a document in Google Drive with Python (PyDrive)
- how to deploy the script on AWS Lambda and configure Amazon API Gateway
- how to call AWS Lambda from Slash command
- Summary (1min)
- Questions and answers (2min)