本文整理汇总了Python中config.Configuration.get_server_implementation方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration.get_server_implementation方法的具体用法?Python Configuration.get_server_implementation怎么用?Python Configuration.get_server_implementation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类config.Configuration
的用法示例。
在下文中一共展示了Configuration.get_server_implementation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Configuration
# 需要导入模块: from config import Configuration [as 别名]
# 或者: from config.Configuration import get_server_implementation [as 别名]
import web, re, base64, urllib, uuid, os
from web.wsgiserver import CherryPyWSGIServer
from core import Auth, SwordError, AuthException, DepositRequest, DeleteRequest
from negotiator import ContentNegotiator, AcceptParameters, ContentType
from spec import Errors, HttpHeaders, ValidationException
from sss_logging import logging
ssslog = logging.getLogger(__name__)
# create the global configuration and import the implementation classes
from config import Configuration
config = Configuration()
Authenticator = config.get_authenticator_implementation()
SwordServer = config.get_server_implementation()
WebInterface = config.get_webui_implementation()
# Whether to run using SSL. This uses a default self-signed certificate. Change the paths to
# use an alternative set of keys
ssl = False
if ssl:
CherryPyWSGIServer.ssl_certificate = "./ssl/cacert.pem"
CherryPyWSGIServer.ssl_private_key = "./ssl/privkey.pem"
# SWORD URLS
#############################################################################
# Define our URL mappings for the web service. We are using URL parts immediately after the base of the service
# which reflect the short-hand terms used in the SWORD documentation (sd-uri, col-uri, cont-uri, em-uri and edit-uri
#
urls = (
'/', 'WebUI', # Home page, with an intro and some handy links
'/sd-uri', 'ServiceDocument', # From which to retrieve the service document