Python Logo on a stylized background

Python Style Guides

In my pursuit to update my open-source Python Twitter bot, the retweet-bot, I decided to implement style recommendations followed by other open-source projects. This led me to use Pylint and follow the official PEP guidelines in the project. However, I was not prepared for the level of difficulty and pain that followed while implementing style guidelines. While my codebase now follows a consistent style found throughout the open-source Python world, it presented numerous pain points. Through this article, I aim to provide an overview of the pros and cons of Python style guidelines, and to enlighten readers to view these guidelines as flexible, especially for older codebases.

As developers, we have a responsibility to ensure that our code is of high quality and meets certain standards. This is the primary focus of Python style guidelines, and we will explore the pros and cons of both Pylint and PEP8 in this article. I will share my perspective as a relatively novice Python developer.

Continue reading →
Microcosm Twitter Bot Header Image

Microcosm Twitter Bot

I set a goal for #30DayDev January to create a Twitter bot, there weren’t many requirements beyond that it had to retweet people using the hashtag. I can say that after the first week of January I have achieved that goal and released DevMicrocosm into the wild. It followed my rough plan for the project, using Python and Tweepy. This combination of language and library reaffirmed my expectation that it would be quick to develop and deploy.

Due to the Python being able to test commands directly in the terminal, it led to some fantastic opportunities to rapidly prototype some ideas, one of these was to use fully fledged configurations for multiple hashtags. This means that there is no need to redeploy the application every time you want to update what hashtags are being retweeted, you can simply change the config file and the next time the python file is run it’ll use the updated settings.

Continue reading →