TornadoServer create a web server and load services. It may work better with TornadoClient but as it accepts HTTPS you can create your own client

class DIRAC.Core.Tornado.Server.TornadoServer.TornadoServer(services=None, port=None)

Bases: object

Tornado webserver

Initialize and run an HTTPS Server for DIRAC services. By default it load all https services defined in the CS, but you can also give an explicit list.

The listening port is either:

  • Given as parameter

  • Loaded from the CS /Systems/Tornado/<instance>/Port

  • Default to 8443

Example 1: Easy way to start tornado:

# Initialize server and load services
serverToLaunch = TornadoServer()

# Start listening when ready

Example 2:We want to debug service1 and service2 only, and use another port for that

services = ['component/service1', 'component/service2']
serverToLaunch = TornadoServer(services=services, port=1234)
__init__(services=None, port=None)
  • services (list) – (default None) List of service handlers to load. If None, loads all

  • port (int) – Port to listen to. If None, the port is resolved following the logic described in the class documentation


Starts the tornado server when ready. This method never returns.