Attending the PyCon Kyushu 2022 in Kumamoto

· Iqbal Abdullah

PyCon Kyushu 2022 in Kumamoto

PyCon Kyushu is a technical conference for the users of the Python programming language in the Kyushu region. I took this opportunity to participate and travel to meet our fellow Pythonistas after a long 2-year break.

PyCon Kyushu since 2017

For those of you who are not familiar with the PyCons in Japan, this is the 4th edition of PyCon Kyushu.

Previous PyCon Kyushu events were held in different cities in the Kyushu region. The organizers make it a point for different communities in the different cities within the Kyushu region to have the chance to hold the conference in their cities:

This year’s theme: Grow with Covid-19

On a sunny Saturday of 22nd January, the first Python-related conference for 2022 in Kyushu was held in Kumamoto-Jo Hall (熊本城ホール).

The venue is located in a strategic location within Kumamoto city. It is part of a mall where you can get things to eat and other stuff, while across the street there is a Dormy Inn hotel. Connected to the venue is also the Sakuramachi Bus Terminal (桜町バスターミナル), where you can catch a bus to the Kumamoto Airport and basically anywhere else in Kyushu.

The talks

The talks were spread out into two tracks, and here are some talks which I could attend. All of the talks were done in Japanese. I am fluent in the language and can understand the talks, but writing in English while listening to them is another skill altogether that I do not have.

If you’re interested in the details of the talks, you should read the actual slides. I will include links to the slides in this post if they are made available by the speakers.

Consider this post as giving a scrappy, high-level overview and a feel for the kind of content that we had during PyCon Kyushu 2022.

Keynote by Takayuki Shimizukawa: Programming and me

The keynote for this year was by Takayuki Shimizukawa, a well-known Pythonista within the community. He joined us remotely from Tokyo.

Shimizukawa-san is a back-end developer working for BeProud, and is also one of the directors of PyCon JP Association. He is also one of the trainers for Python Boot Camp and is also a published writer of many Python books.

Shimizukawa-san talked about his programming journey, starting from 1985 with his experience in gaming, and started playing around with Python in 2003. He continued to talk about starting various user groups and meet-ups, with the biggest one in 2010 which was the start of PyCon JP, now the largest Python conference in Japan.

His keynote was aimed more towards newcomers, reflecting on the path he has taken in the many years being involved in the open-source and Python community.

Some of the advice given by Shimizukawa-san to the audience based on his experience were:

  • Act true to yourself (素直に行動する): Don’t be pedagogical and get caught in petty disagreements but enjoy the moment. If you’re given praise for something you have done, enjoy it as it is and don’t think too much.
  • Go all the way (徹底的に取り込む): Continue writing and improving yourself: If we’re not improving, that means we’re not writing enough. Giving back is as important as learning. Talk to people and write down what you have learned.
  • Always be present (常に参加する): Take chances and jump in if the opportunity presents itself. If it turns out it’s not what you wanted, then you can always change direction. He used the analogy of the “bus”: If you feel that the bus is heading where you want to get to, take a chance and jump on it, but if it turns out it’s not where you want to go, then you can always get off and take a different bus.

Shimizukawa-san has been present since the start of the internet boom age in Japan and hearing his keynote sort of gives you a feel of how open-source, the importance of community involvement, and how open-source and the Python community has evolved and expanded in Japan over the years.

Becoming a Pythonista from analyzing static code by Yuki Takino

The next talk was by Yuki Takino on using tools to analyze static code. He started by addressing the obvious question: “What is analyzing static code”.

Takino-san introduces the audience to some commonly used tools, such as:

  • If you search for “Python code checker” flake8 will perhaps be the first tool you’ll find. flake8 is a wrapper of pycodestyle, pyflakes and mccabe
  • black: A code formatter. Very little things you can customize with black, and follows PEP8 religiously.
  • isort: Follows PEP8 guidelines in sorting out the import statements that you have
  • autopep8: A tool written by a Japanese, and might be useful if you want to use a library in Japanese. autopep8 can also fix the code for you according to PEP8
  • YAPF: No comments on the fight between black and YAPF. YAPF is a formatter with high customization capabilities. It’s written by Google, so there is a level of confidence in it.

Takino-san showed examples of each tool’s output and how it affected code to the audience. Other tools introduced were:

  • mypy: Type hints were introduced from Python 3.5. You can use mypy with type hints if you would like to increase the readability of your code using type hints.
  • Bandit: Checks for common security issues with your Python code. It can also create reports in html for easier reading
  • github webhooks such as pre-commit: Runs arbitrary scripts before committing. This will help you with automating tests and saving time. Be careful with the competition issues between black and isort if you’re using this pre-commit

The slides for Takino-san’s talk can be downloaded here

Reading CPython source code by Akira Nonaka

Akira is also a team member with me in Xoxzo and he shared with us his experience trying to read the CPython source code.

Some of the interesting things he mentioned during his talk:

  • Used CLion as his preferred tool to read the code. This is mostly because he is already familiar with PyCharm which he uses when he writes Python.
  • Took 2 minutes to compile on M1 Macbook air and produce the python.exe file
  • Each directory in the CPython source code is separated into logical sections that are explicitly named to reflect what it contains, for example:
  • Modules/ Standard libraries and built-in modules
  • Programs/ is the main entry point

He also explains the flow of processing the source code, from the back and forth of lexical analysis and parsing the program, to compiling (creating the .pyc file) and finally executing it. His talk today’s talk focused more on the lexical and parsing section of the flow.

Some other pointers he mentioned:
– It might be best not to try to understand Parser/parser.c. It’s long and is a generated file by the Parser Generator
struct tok_state (tokenizer.h) holds the indent data and remembers the location of the column number.
– Each indent takes up one stack, and the maximum stack is 100.

At the end of the talk, Akira showed a demo by changing a definition of the parser by replacing it with a different definition and recompiling the code to see how it actually works from the Python interpreter.

Cloud Dataflow and processing large data with Python by Masato Nakamura

The speaker, Nakamura-san joined us online. There were some technical hiccups at the start when the audio and video were cut off, but we got underway after a bit of fixing.

The main theme of his talk was using Python as the infrastructure or 基盤 for processing data.

Some of the things he mentioned during his talk

  • There are 3 steps in data processing: Input it from somewhere (usually a database), transform it into something, and output it for consumption.
  • If you’re using Google Cloud (Big Query), you should use Cloud Dataflow
  • How to choose the right infrastructure for data
  • Advantages of using Cloud Dataflow

An important point he pointed out is that the data infrastructure that you choose should solve for you the problem of
– Accessing the data for different roles in the company
– Easily allow you to keep the freshness of your data.

The slides can be downloaded here

Introduction to structural pattern matching by Takanori Suzuki

Takanori-san started off by introducing to the audience the new stuff introduced in Python 3.10, and one of them was structural pattern matching.
An interesting thing he pointed out was that structural pattern matching is that it is covered by 3 PEPs. Usually, you’ll have one PEP to define the functionality, but structural pattern matching has 3!

With pattern matching, we can write cleaner code than the usual if/elif/else logic that we’re accustomed to.

There were a few patterns quickly covered during the talk, such as
– Literal pattern
– OR pattern
– AS pattern
– Wild card pattern
– Class pattern
– Sequence pattern
– Mapping pattern

I’m not using Python 3.10 right now and did not have the pleasure of trying out structural pattern matching out, but it seems helpful when we have a complex if/elif/else logic to be replaced. Before that, I first need to understand the different patterns available.

The slides can be found here

Introduction to gRPC with Python: Webchat implementation hands-on by nishida

nishida is the founder of “Code for Yamaguchi”. He is still in school, but currently is preparing to launch his business. His talk today was to introduce gRPC through a simple implementation of chat.

The talk started with introducing the world of ReST API. ReST API has been a good thing for developers making it seamless between servers and clients, but at the same time, there are issues such as non-uniformed API development which makes it confusing.

Contents of the talk
– What is RPC? (Remote Procedure Call)
– What is gRPC? (a RPC framework released by Google in Feb 2015).

If you’re using gRPC, you can choose between different types of communication:
– Unary RPC (one response to one request)
– Client streaming RPC (one response to many requests)
– Server streaming RPC and (many responses to one request)
Bi-directional streaming RPC (many responses to many requests)

Bi-directional streaming RPC is what we’re usually interested in when we talk about RPC.

Problems with gRPC:
– Doesn’t support HTTP/1. If you have a browser or an environment that can only use HTTP/1, then gRPC is not for you. But if you try using gRPC Web or gRPC web proxy might work for you.

To summarize, using gRPC allows you to have:
– High-speed communications with gRPC (HTTP/2 + protobuf)
– Making scheme first development possible
– Supports different ways of communications

nishida also has sample code for a hands-on experience to learn about gRPC with Python, which you can find here.

Slides for his talk can be found here.

The state of Python in 2022 by Manabu Terada

The final talk I attended was on the state of Python in 2022 by Manabu Terada, which is an updated talk that was originally made for the first mini PyCon Kyushu in 2017, which was also in Kumamoto (I was also present at that time)

Terada-san lists out his personal development environment and his favorite tools that he uses for implementation, such as the version of Python that he uses.

Interesting points during his presentation
– A comparison that he made between the years when different versions of Python were released against events such as PyCon APAC in SG, PyCon Kyushu in Fukuoka, and PyCon APAC in JP which I can relate to.
– Explanation of the “wheel” (PEP427: The Wheel Binary Package Format). What is wheel? Turns out it’s a way to install packages that require C compilation to fit with different machine architectures. I didn’t know this!

There was little technical content in the talk, but more of looking back at the history and timeline of the different Python versions and personal preferences of the speaker such as when to upgrade to a newer Python version or which installer to use. There was also some explanation on how to read the Python version numbers.

Slides can be found here

Lightning talks

As usual, during PyCons, we had a session for 5 minutes so-called “lightning talks”. Three lightning talks were done

  1. The future as the chairperson for PyCon JP 2022 by Lina Katayose
  2. Searching for the lost dream. Using BigSleep
  3. Handling the violent version ups on Ansible as an infrastructure engineer by koedoyoshida

Other stuff


PyCon JP Association’s PyCon JP TV was also there interviewing the speakers and attendees for another episode of their program. Their program is in Japanese but if you want a quick and deep lowdown on the current status of Python and its community in Japan, they might be one of the best sources you can have

To summarize

It was refreshing to finally get together again with the Python community to spend a day listening to talks and conversing in person.

I would like to thank the staff for PyCon Kyushu 2022 in Kumamoto led by Fumikazu Kiyota who overcame a difficult situation to still manage an in-person conference even though just the day before the conference Kumamoto Prefecture called a quasi-emergency state because of the rise in cases from Omicron.

The PyCon Kyushu edition this year had a total of 35 attendance including staff and sponsors. 11 people canceled due to the surging Omicron situation, so they saw the pandemic affecting 20% of this year’s PyCon Kyushu.

Finally, it was great meeting up with the odd 40 or so people who were there to support the conference. Here’s a group picture for those of you who couldn’t make it: