WebSource code for wsme.api. import traceback import functools import inspect import logging import wsme.exc import wsme.types from wsme import utils log = logging.getLogger(__name__) def iswsmefunction(f): return hasattr(f, '_wsme_definition') def wrapfunc(f): @functools.wraps(f) def wrapper(*args, **kwargs): return f(*args, **kwargs) … Webfrom wsme import WSRoot, expose class MyService (WSRoot): @expose (unicode, unicode) # First parameter is the return type, # then the function argument types def hello (self, who=u'World'): return u"Hello {0} !".format (who) ws = MyService (protocols= ['restjson', 'restxml']) application = ws.wsgiapp ()
OpenStack Docs: glance.common.wsme_utils
http://wsme.readthedocs.io/en/latest/_modules/wsme/api.html WebSee the # License for the specific language governing permissions and limitations # under the License. from datetime import datetime from wsme import types as wsme_types from glance.common import timeutils. class WSMEModelTransformer (object): cleaning cfcs
GitHub - aviau/wsme
WebAug 21, 2024 · See the # License for the specific language governing permissions and limitations # under the License. from datetime import datetime from wsme import types as wsme_types from glance.common import timeutils. … WebTo define a user type, you just have to inherit from wsme.types.UserType and instantiate your new class. This instance will be your new type and can be used as @ wsme.expose or @ wsme.validate parameters. Note that protocols can choose to specifically handle a user type or a base class of user types. WebOct 3, 2014 · from wsme import WSRoot, expose class MyService (WSRoot): @expose (unicode, unicode) # First parameter is the return type, # then the function argument types def hello (self, who=u'World'): return u"Hello {0} !".format (who) ws = MyService (protocols= ['restjson', 'restxml', 'soap']) application = ws.wsgiapp () downtown workers are here for portland