# Bridge discourse with python scripts

**URL:** https://meta.discourse.org/t/bridge-discourse-with-python-scripts/64852
**Category:** Development
**Created:** [June 21, 2017, 2:08am UTC](https://meta.discourse.org/t/bridge-discourse-with-python-scripts/64852 "2017-06-21T02:08:38Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![chambers.d](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@chambers.d](https://meta.discourse.org/u/chambers.d)
#### Post date: [June 21, 2017, 2:08am UTC](https://meta.discourse.org/t/bridge-discourse-with-python-scripts/64852/1 "2017-06-21T02:08:38Z")

</div>

So I made the switch to use discourse as my main site. I face one obstacle though. I have a few python scripts that I would like to tie to the restful API. I know discourse uses Ruby and I can easily convert my scripts to ruby if need be. How would I go about using the discourse API to expose my scripts to be called by my users?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [June 21, 2017, 1:19pm UTC](https://meta.discourse.org/t/bridge-discourse-with-python-scripts/64852/2 "2017-06-21T13:19:55Z")

</div>

What are these scripts? What do they do?

---

<div class="post-metadata">

### Author: ![chambers.d](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@chambers.d](https://meta.discourse.org/u/chambers.d)
#### Post date: [June 21, 2017, 7:07pm UTC](https://meta.discourse.org/t/bridge-discourse-with-python-scripts/64852/3 "2017-06-21T19:07:54Z")

</div>

It’s for a trivia game. Basically you send an http GET request with a date and it returns a list of celebrities names that all share the same birthday. These are all stored in a database and returned in json format.

---

<div class="post-metadata">

### Author: ![elijah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elijah/32/104055_2.png) [@elijah](https://meta.discourse.org/u/elijah)
#### Post date: [June 29, 2017, 5:19am UTC](https://meta.discourse.org/t/bridge-discourse-with-python-scripts/64852/4 "2017-06-29T05:19:06Z")

</div>

This request makes me think of discobot. You can summon the bot to roll a specified number of dice or to fetch a quotation from an online quote service (results returned in JSON) that then gets formatted for the page.

@discobot quote

Making an interface like that for your celebrity birthday game might be as easy as picking through the bot code to make your own birthday bot plugin.

---

<div class="post-metadata">

### Author: ![discobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discobot/32/68978_2.png) [@discobot](https://meta.discourse.org/u/discobot)
#### Post date: [June 29, 2017, 5:19am UTC](https://meta.discourse.org/t/bridge-discourse-with-python-scripts/64852/5 "2017-06-29T05:19:10Z")

</div>

> 🗨 _In order to live free and happily you must sacrifice boredom. It is not always an easy sacrifice._ — Richard Bach

---

<div class="post-metadata">

### Author: ![discobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discobot/32/68978_2.png) [@discobot](https://meta.discourse.org/u/discobot)
#### Post date: [July 25, 2025, 12:48am UTC](https://meta.discourse.org/t/bridge-discourse-with-python-scripts/64852/12 "2025-07-25T00:48:06Z")

</div>

Hi! To find out what I can do, say `@discobot display help`.
