Interact with discourse from Python?


(Bar Smith) #1

Hi everyone! Love discourse, it’s the backbone of our community.

We are an open source project with a strong presence on Github. We have a robot written in Python which manages our Github repositories and does things like merge pull requests automatically if they have been approved. Since we have a lot of repositories and not everyone follows every repository it would be awesome if the robot could post in the forums when a new project is created or when a pull request needs to be reviewed.

Can anyone point me in the direction of how I could best call the Discourse API from Python?


(Blake Erickson) #2

There is a python discourse api library that is a few years old:

And a forked version that has been updated somewhat recently:

Hopefully the latter one will work for you.

Also this plugin may be of interest to you:


(Bar Smith) #3

Thanks @blake! That is exactly the kind of thing I needed to get started.

I will report back with my successes.