Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(70)  |  Call(33)  |  Derive(0)  |  Import(37)
Create a Web Server

Create a Web Server (HTTP) complete with the default Dispatcher to
parse requests and posted form data dispatching to appropriate
Controller(s).

See: circuits.web.servers.BaseServer

src/c/i/circuits-3.0.0.dev/examples/web/ssl-forward-cert.py   circuits(Download)
import ssl
 
from circuits.web import Server, Controller
 
 
 
app = Server(
    ("0.0.0.0", 8443),
    ssl=True, certfile="server-cert.pem", keyfile="server-key.pem",
    ca_certs="ca-chain.pem", cert_reqs=ssl.CERT_OPTIONAL

src/c/i/circuits-3.0.0.dev/examples/web/sslserver.py   circuits(Download)
#!/usr/bin/env python
 
from circuits.web import Server, Controller
 
 
 
 
app = Server(("0.0.0.0", 8443), secure=True, certfile="cert.pem")
Root().register(app)
app.run()

src/c/i/circuits-3.0.0.dev/examples/web/websockets.py   circuits(Download)
from circuits import Component, Debugger
from circuits.web.dispatchers import WebSockets
from circuits.web import Controller, Logger, Server, Static
 
 
        return "Hello World!"
 
app = Server(("0.0.0.0", 8000))
Debugger().register(app)
Static().register(app)

src/c/i/circuits-3.0.0.dev/examples/web/sessions.py   circuits(Download)
#!/usr/bin/env python
 
from circuits.web import Server, Controller, Sessions
 
 
        return "Hello %s!" % name
 
app = Server(("0.0.0.0", 8000))
Sessions().register(app)
Root().register(app)

src/c/i/circuits-3.0.0.dev/examples/web/jsonserializer.py   circuits(Download)
 
from circuits import handler, Component
from circuits.web import Server, Controller, Logger
 
 
        return {"message": "Hello World!"}
 
app = Server(("0.0.0.0", 8000))
JSONSerializer().register(app)
Logger().register(app)

src/c/i/circuits-3.0.0.dev/examples/web/xmlrpc_demo.py   circuits(Download)
#!/usr/bin/env python
 
from circuits import Component
from circuits.web import Server, Logger, XMLRPC
 
        return a, b, c
 
app = Server(("0.0.0.0", 8000))
Logger().register(app)
XMLRPC().register(app)

src/c/i/circuits-3.0.0.dev/examples/web/jsonrpc.py   circuits(Download)
#!/usr/bin/env python
 
from circuits import Component
from circuits.web import Server, Logger, JSONRPC
 
        return a, b, c
 
app = Server(("0.0.0.0", 8000))
Logger().register(app)
JSONRPC().register(app)

src/c/i/circuits-3.0.0.dev/docs/source/examples/helloweb.py   circuits(Download)
#!/usr/bin/env python
 
from circuits.web import Server, Controller
 
 
        return "Hello World!"
 
app = Server(("0.0.0.0", 9000))
Root().register(app)
app.run()

src/c/i/circuits-3.0.0.dev/examples/web/jsontool.py   circuits(Download)
#!/usr/bin/env python
 
from json import dumps
 
from circuits.web import Server, Controller
        return range(int(limit))
 
app = Server(("0.0.0.0", 8000))
Root().register(app)
app.run()

src/c/i/circuits-3.0.0.dev/examples/web/jsoncontroller.py   circuits(Download)
#!/usr/bin/env python
 
from circuits.web import Server, JSONController
 
 
        return {"success": True, "message": "Hello World!"}
 
app = Server(("0.0.0.0", 8000))
Root().register(app)
app.run()

  1 | 2 | 3 | 4  Next