# Hotwire turbo streams, working with php, python

**URL:** <https://discuss.hotwired.dev/t/hotwire-turbo-streams-working-with-php-python/3699>\
**Category:** General\
**Created:** [January 14, 2022, 9:59am UTC](https://discuss.hotwired.dev/t/hotwire-turbo-streams-working-with-php-python/3699 "2022-01-14T09:59:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andileni](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/andileni/32/2119_2.png) [@andileni](https://discuss.hotwired.dev/u/andileni)\
**Post date:** [January 14, 2022, 9:59am UTC](https://discuss.hotwired.dev/t/hotwire-turbo-streams-working-with-php-python/3699/1 "2022-01-14T09:59:04Z")

</div>

Hello,  
I have used turbo with a php based backend some time ago, and it was working okay in my opinion.  
Today I saw the video featuring a real-time chat app, and I wanted to know, wether this also works with a php or python based backend?

Thanks and kind regards

---

<div class="post-metadata">

**Author:** ![pinzonjulian](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/pinzonjulian/32/751_2.png) [@pinzonjulian](https://discuss.hotwired.dev/u/pinzonjulian)\
**Post date:** [January 19, 2022, 10:44pm UTC](https://discuss.hotwired.dev/t/hotwire-turbo-streams-working-with-php-python/3699/2 "2022-01-19T22:44:05Z")

</div>

Yes it definitely should!  
Turbo is completely backend agnostic so all of its concepts should work regardless of the backend choices you make.

One of the core pieces is allowing your backend to register a new mime type to process forms. Other frameworks can take inspiration from the `turbo_rails` gem. Take a look at how rails registers a new mime type [here](https://github.com/hotwired/turbo-rails/blob/6958e0e2742d4744da80128d178e7255989386a4/lib/turbo/engine.rb).

The `turbo-rails` gem uses Rails’ queue framework, `ActiveJob` in order to process broadcasts to the frontend via web sockets. Take a look [here](https://github.com/hotwired/turbo-rails/blob/6958e0e2742d4744da80128d178e7255989386a4/app/channels/turbo/streams/broadcasts.rb#L79).

These background jobs send updates to the front end via web sockets which insert turbo streams to the dom. They then get processed by Turbo (the js library) and content gets modified in the dom.

I also found a couple of implementations. I haven’t used them but that seems like a good place to start  
Django

> **[GitHub - hotwire-django/turbo-django: An early stage integration of Hotwire...](https://github.com/hotwire-django/turbo-django)**
>
> An early stage integration of Hotwire Turbo with Django - GitHub - hotwire-django/turbo-django: An early stage integration of Hotwire Turbo with Django

Laravel

> **[GitHub - tonysm/turbo-laravel: This package gives you a set of conventions to...](https://github.com/tonysm/turbo-laravel)**
>
> This package gives you a set of conventions to make the most out of Hotwire in Laravel. - GitHub - tonysm/turbo-laravel: This package gives you a set of conventions to make the most out of Hotwire ...

---

<div class="post-metadata">

**Author:** ![andileni](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/andileni/32/2119_2.png) [@andileni](https://discuss.hotwired.dev/u/andileni)\
**Post date:** [January 22, 2022, 10:46am UTC](https://discuss.hotwired.dev/t/hotwire-turbo-streams-working-with-php-python/3699/3 "2022-01-22T10:46:55Z")

</div>

Thank you for your detailed answer! I will have a look at them.
