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

All Samples(15)  |  Call(6)  |  Derive(0)  |  Import(9)

        def serve(app, port, secure=True, debug=False):
    kwargs = {'host': '0.0.0.0',
              'port': int(port),
              'debug': debug}

    if secure and SECURITY_AVAILBLE:
        key_fd, key_fn, key = generate_key()
        cert_fd, cert_fn = generate_certificate(key)

        context = SSL.Context(SSL.SSLv23_METHOD)
        context.use_privatekey_file(key_fn)
        context.use_certificate_file(cert_fn)
        kwargs['ssl_context'] = context
    else:
        print "HTTPS server mode unavailble due to missing pyOpenSSL==0.13 library. Please install it to enable HTTPS server mode."

    app.run(**kwargs)

    if secure and SECURITY_AVAILBLE:
        os.close(cert_fd)
        os.remove(cert_fn)

        os.close(key_fd)
        os.remove(key_fn)
        


src/g/r/grip-2.0.0/grip/command.py   grip(Download)
from path_and_address import resolve, split_address
from docopt import docopt
from .server import serve
from .exporter import export
from . import __version__
    # Run server
    try:
        serve(path, host, port, args['--gfm'], args['--context'],
              args['--user'], args['--pass'], False)
        return 0

src/g/r/grip-HEAD/grip/command.py   grip(Download)
from path_and_address import resolve, split_address
from docopt import docopt
from .server import serve
from .exporter import export
from . import __version__
    # Run server
    try:
        serve(path, host, port, args['--gfm'], args['--context'],
              args['--user'], args['--pass'], False)
        return 0

src/c/o/composer-HEAD/composer/command.py   composer(Download)
 
from .index import Index, import_object
from .server import serve
 
 
log = logging.getLogger(__name__)
 
def serve_command(index, **kw):
    serve(index, use_reloader=True, **kw)

src/d/h/dhclientlist-0.0.4/dhclientlist/__main__.py   dhclientlist(Download)
 
elif args.command == 'serve':
    server.serve(server.application.build(get, args.address, args.username, args.password,
                                          util.drivername_to_module(args.drivername),
                                          args.http_username, args.http_password),

src/b/r/brat-HEAD/standalone.py   brat(Download)
# brat imports
sys.path.append(os.path.join(os.path.dirname(__file__), 'server/src'))
from server import serve
 
# pre-import everything possible (TODO: prune unnecessary)
 
        # Call main server
        cookie_hdrs, response_data = serve(params, remote_addr, remote_host,
                                           cookie_data)
 

src/m/a/makeblog-HEAD/makeblog/makeblog.py   makeblog(Download)
        config = cf.load_config(args.command_arg)
        config.is_dynamic = True
        server.serve(config)
 
    else:

src/g/r/grip-2.0.0/grip/__init__.py   grip(Download)
from . import command
from .renderer import render_content, render_page
from .server import default_filenames, create_app, serve
from .exporter import export
 

src/g/r/grip-HEAD/grip/__init__.py   grip(Download)
from . import command
from .renderer import render_content, render_page
from .server import default_filenames, create_app, serve
from .exporter import export
 

src/g/o/google_closure_fabric-0.0.5/google_closure_fabric/__init__.py   google_closure_fabric(Download)
from bootstrap import bootstrap
from parts.templates import TemplatesBuilder
from server import serve

src/h/g/hgblog-0.7.1/hgblog/__init__.py   hgblog(Download)
from server import serve
 
__version__ = '0.7.1'