Code Challenge 43 - Build a Chatbot Using Python

PyBites, Thu 09 November 2017, Challenge

AI, books, bots, chatbot, contest, Facebook, ML, monitoring, NLP, Slack, Twitter

It's not that I'm so smart, it's just that I stay with problems longer. - A. Einstein

Hi Pythonistas, it's incredible to think how quickly bots have grown in popularity. They're everywhere these days and will play an important role how we work and communicate in the near future! It's about time we go our bot on as well!

We even happily buy a book on chatbots for the Pythonista with the most original submission (and no, bots won't vote for it, PyBites humans will!)

The Challenge

It's simple. Create your very own bot!

The bot can do whatever you want. The aim here is to have a functioning bot written in Python. Stretch yourself, wow your colleagues and friends, this is a cool skill to add to your toolkit.

Here are some ideas to get you started:


If you've conquered bots already, consider adding further functionality to your bot. How about a bot that takes a command and uses another API? Eg: A specific event or command will tell your bot to tweet something.

Can you leverage AI (artificial intelligence), NLP (natural language processing) and/or ML (machine learning) technologies? Watch out though ;)


On that note you will lose points if you create Skynet. Unless of course you also create a T-800 Model Terminator, then it's okay... sort of.

Win a copy of "Designing Bots"!

We are really excited about this one. Not convinced yet? OK, we will personally send a copy of Designing Bots: Creating Conversational Experiences to the coolest PR (voting to be done by us and our Slack community).

3 conditions need to be met though:

  1. There must be at least 5 PRs submitted for this challenge (excluding Bob/Julian), otherwise it is not a competition. - update: nah ... bots are cool, specially in Python + PR'd to PyBites, the more the merrier, but the best submission gets the book, regardless the number of PRs :)

  2. It must be your own code which you developed during this challenge, be cool, no shortcuts.

  3. The solution must be original and working Python code, so please include install instructions so we can easily test it out.

Submission deadline: 1st of December 23:59:59 CET.


A few (Slack biased - we just love their API) resources to help you get started if you're really stuck!

PyBites Slack

You like these challenges? We have published quite a few and we're not planning to stop anytime soon.

You really like them and plan on PR'ing more in the future? Then consider joining our private Slack channel sending us an email. This way you get the unique opportunity to learn from other passionate Pythonistas and share some of your experience.


You can PR your work to our Community branch of our Challenges repo. We will include it in our review post. Our PR template also lets you reflect a bit on your learning and provide some feedback how we can keep our challenges interesting. See detailed instructions here.


Our goal is to learn and teach you Python through practical exercises. Learning a programming language is way more fun as a community!

For any feedback, issues or ideas use GH Issues, tweet us or drop us an email.

Keep Calm and Code in Python!

-- PyBites

PyBites Python Tips

Do you want to get 250+ concise and applicable Python tips in an ebook that will cost you less than 10 bucks (future updates included), check it out here.

Get our Python Tips Book

"The discussions are succinct yet thorough enough to give you a solid grasp of the particular problem. I just wish I would have had this book when I started learning Python." - Daniel H

"Bob and Julian are the masters at aggregating these small snippets of code that can really make certain aspects of coding easier." - Jesse B

"This is now my favourite first Python go-to reference." - Anthony L

"Do you ever go on one of those cooking websites for a recipe and have to scroll for what feels like an eternity to get to the ingredients and the 4 steps the recipe actually takes? This is the opposite of that." - Sergio S

Get the book