.. _toyz_api: ******** Toyz API ******** As mentioned previously, Toyz is a web application run on the python `Tornado `_ web framework. This document won't go into the details of how Tornado handles requests, as most of this work is done behind the scenes and Toyz contains an API that should allow even power users to ignore the Tornado web framework. The main goal of the web API is to allow scientists, who tend to be more proficient in python than web languages like html, js, and css, to have to learn and use as little of those languages as possible. Another goal is to make it quick and easy to build GUI's, as a big part of the reason that scientific software is mostly done from the command line is that it's sooooo much easier to do it that way... unless you're using *someone else's* code. toyz_core.js ============ This module contains the core functions and objects used for communication with the web application. Toyz.Core.Websocket ------------------- Other than ``get`` and ``post`` requests for files, the ``Toyz.Core.Websocket`` object handles all of the communications with the web application. In practice each web page should only have a single websocket connection, although multiple tiles and controls on the page can use it (there are some exceptions, for example the `file_dialog`_ has its own websocket). To create a new websocket, on an html pages ``