DEV Community

Cover image for Building a real-time chatbot server in Python with WebSocket, ChatterBot and Bocadillo

Building a real-time chatbot server in Python with WebSocket, ChatterBot and Bocadillo

Florimond Manca on March 19, 2019

This post is an adaptation of the official Bocadillo tutorial. Hi everyone! Today's post is going to be a little special. Some of you may remember...
Collapse
 
rhymes profile image
rhymes

Hi Florimond! Great update on your project and tutorial.

First and foremost congrats for the talk, hopefully you'll write a recap article after that ;)

I like how you adopted py.test fixture mechanism, though it requires a little bit of discipline by the developer, not two have too many globals around :)

Bocadillo is quite simple, great job!

ps. the link for your previous article is broken and I though you should probably mention that client.py works only on Python 3.7 because of asyncio.run()

Collapse
 
florimondmanca profile image
Florimond Manca Bocadillo

Thanks! Of course I’ll publish a recap, along with the slides etc. 🙌

I’m glad you enjoy the new providers API!

I fixed the article link and added a note for Python 3.6. :-)

Collapse
 
jm8985 profile image
Jacob

Hi Florimond, the code from the tutorial works perfectly. However when I copied the tutorial from github.com/bocadilloproject/bocadi...

This fixes the error for me:

In providerconf.py, remove "async" from line 29.
In app.py, remove "async" from line 9.

Merci bcp

Collapse
 
florimondmanca profile image
Florimond Manca Bocadillo

Ah, you’re right! The async keywords in those two lines are artifacts from a previous change. :) I pushed a fix in #231, will merge it later. Thanks for spotting this!

Collapse
 
nishchit14 profile image
Nishchit

That's a great post 👏

I would love to know how it works with Firecamp, I am not a Python dev but would be happy If I can test Firecamp with Python WS server.

Collapse
 
jm8985 profile image
Jacob

Hi Florimond,

I can't tell you how happy I am to find your project.

This is EXACTLY what I've been looking for! Why is async and python so unloved?

Many thanks!

Collapse
 
florimondmanca profile image
Florimond Manca Bocadillo

Thanks for your comment! Very happy that this was useful to you. :-)

Collapse
 
abdurrahmaanj profile image
Abdur-Rahmaan Janhangeer
#ASmashOfAnArticle
#ArticleDelice