# Interact with discourse from Python?

**URL:** https://meta.discourse.org/t/interact-with-discourse-from-python/87543
**Category:** Development
**Created:** [May 15, 2018, 4:34pm UTC](https://meta.discourse.org/t/interact-with-discourse-from-python/87543 "2018-05-15T16:34:39Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [August 31, 2023, 8:11am UTC](https://meta.discourse.org/t/interact-with-discourse-from-python/87543/12 "2023-08-31T08:11:05Z")

</div>

> [@EricGT](#):
>
> As a side question, can Discourse Plugins and/or themes be created using Python?

Themes, definitely not, that’s only Javascript, CSS & HTML.

Plugins: Kind of.

You can import Python modules into a Ruby (on Rails) based Discourse plugin and call Python functions using Pycall: [GitHub - red-data-tools/pycall.rb: Calling Python functions from the Ruby language · GitHub](https://github.com/mrkn/pycall.rb)

I use it in Production for a very specific purpose as there is no equivalent module maintained in the RoR ecosystem so it avoids me having to translate and then maintain all that specialist code in Ruby.

It works surprisingly well.

That said, the base of that Plugin is still written in Ruby.

I would recommend you simply learnt Ruby on Rails as well - it really is a very pleasant language and imho the code is nicer to read than Python :slight_smile:

I should also take the time to learn more Python if/when needs must.

Interesting side note: some of the code in [Discourse Chatbot 🤖](https://meta.discourse.org/t/discourse-chatbot-now-smarter-than-chatgpt/256652) that creates the agent behaviour was based on a Python agent called “Funkagent” which I first translated into Ruby on Rails (and then modified, enhanced.). So translation can be an option of course if it makes sense to do so. In that case it made sense.

---

_[View the full topic](https://meta.discourse.org/t/interact-with-discourse-from-python/87543)._
