
Hello, I have a Twisted network application that I deployed as a twistd plugin. I have different configuration files defining several parameters including some Redis pub/sub channels. Today I use a script to stop and start the plugin with the proper configuration file. I’d like to make a web UI to be able to change the configuration of the application. I already saw some people asking about that but I haven’t found any example. Could anyone point me to some examples of a Twisted application with a web UI? I have developed some Flask web app, so I think it would be easier for me to start with Klein. But I’m not against trying Nevow (Twisted docs recommend it for this purpose). Thanks Benjamin

On Apr 23, 2015, at 16:44, Benjamin BERTRAND <beenje@gmail.com> wrote:
Hello,
I have a Twisted network application that I deployed as a twistd plugin. I have different configuration files defining several parameters including some Redis pub/sub channels. Today I use a script to stop and start the plugin with the proper configuration file. I’d like to make a web UI to be able to change the configuration of the application.
I already saw some people asking about that but I haven’t found any example. Could anyone point me to some examples of a Twisted application with a web UI?
I have developed some Flask web app, so I think it would be easier for me to start with Klein. But I’m not against trying Nevow (Twisted docs recommend it for this purpose).
I think the Twisted docs ought to be updated. If I were starting a web frontend today with Twisted, I would definitely start with Klein and twisted.web.template. Sadly I don't have a simple example to show you immediately; most real-world applications that put web UIs on Twisted are quite complex. Hopefully the template-rendering examples in the Klein documentation are sufficient? -glyph

2015年4月24日 下午12:23于 "Glyph" <glyph@twistedmatrix.com>写道:
On Apr 23, 2015, at 16:44, Benjamin BERTRAND <beenje@gmail.com> wrote:
Hello,
I have a Twisted network application that I deployed as a twistd plugin. I have different configuration files defining several parameters
Today I use a script to stop and start the plugin with the proper configuration file. I’d like to make a web UI to be able to change the configuration of the application.
I already saw some people asking about that but I haven’t found any example. Could anyone point me to some examples of a Twisted application with a web UI?
I have developed some Flask web app, so I think it would be easier for me to start with Klein. But I’m not against trying Nevow (Twisted docs recommend it for this
including some Redis pub/sub channels. purpose).
I think the Twisted docs ought to be updated. If I were starting a web
frontend today with Twisted, I would definitely start with Klein and twisted.web.template.
Sadly I don't have a simple example to show you immediately; most
real-world applications that put web UIs on Twisted are quite complex. Hopefully the template-rendering examples in the Klein documentation are sufficient?
-glyph
hi you can try cyclone.io i have used it for years. it bases on twisted. regards gelin yan

This is not the simplest example, but if you take a look at this project, it has what I think you are describing: https://github.com/cwaldbieser/synthproxy The "BindProxy" proxy has an administrative web service based on Klein. It really only has a single resource for deleting items from the cache, but it shows one way how to integrate the web interface with your other network service. Thanks, Carl Waldbieser On Thu, Apr 23, 2015 at 4:44 PM, Benjamin BERTRAND <beenje@gmail.com> wrote:
Hello,
I have a Twisted network application that I deployed as a twistd plugin. I have different configuration files defining several parameters including some Redis pub/sub channels. Today I use a script to stop and start the plugin with the proper configuration file. I’d like to make a web UI to be able to change the configuration of the application.
I already saw some people asking about that but I haven’t found any example. Could anyone point me to some examples of a Twisted application with a web UI?
I have developed some Flask web app, so I think it would be easier for me to start with Klein. But I’m not against trying Nevow (Twisted docs recommend it for this purpose).
Thanks
Benjamin _______________________________________________ Twisted-web mailing list Twisted-web@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Thank you all for your answers. I’ll start looking more in the given examples. /Benjamin
Le 24 avr. 2015 à 17:26, Carl Waldbieser <cwaldbieser@gmail.com> a écrit :
This is not the simplest example, but if you take a look at this project, it has what I think you are describing:
https://github.com/cwaldbieser/synthproxy <https://github.com/cwaldbieser/synthproxy>
The "BindProxy" proxy has an administrative web service based on Klein. It really only has a single resource for deleting items from the cache, but it shows one way how to integrate the web interface with your other network service.
Thanks, Carl Waldbieser
On Thu, Apr 23, 2015 at 4:44 PM, Benjamin BERTRAND <beenje@gmail.com <mailto:beenje@gmail.com>> wrote: Hello,
I have a Twisted network application that I deployed as a twistd plugin. I have different configuration files defining several parameters including some Redis pub/sub channels. Today I use a script to stop and start the plugin with the proper configuration file. I’d like to make a web UI to be able to change the configuration of the application.
I already saw some people asking about that but I haven’t found any example. Could anyone point me to some examples of a Twisted application with a web UI?
I have developed some Flask web app, so I think it would be easier for me to start with Klein. But I’m not against trying Nevow (Twisted docs recommend it for this purpose).
Thanks
Benjamin _______________________________________________ Twisted-web mailing list Twisted-web@twistedmatrix.com <mailto:Twisted-web@twistedmatrix.com> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web <http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web>
_______________________________________________ Twisted-web mailing list Twisted-web@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
participants (4)
-
Benjamin BERTRAND
-
Carl Waldbieser
-
Gelin Yan
-
Glyph