Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: third_party/gsutil/third_party/protorpc/demos/experimental/wsgi/services.py

Issue 1377933002: [catapult] - Copy Telemetry's gsutilz over to third_party. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: Rename to gsutil. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 from google.appengine.ext.webapp import util
2
3 from protorpc.experimental import wsgi_service
4 from protorpc.experimental import util as wsgi_util
5 from protorpc import protobuf
6 from protorpc import protojson
7
8 from protorpc import registry
9
10 protocols = wsgi_util.Protocols()
11 protocols.add_protocol(protobuf, 'protobuf')
12 protocols.add_protocol(protojson, 'json')
13
14 reg = {'/protorpc': registry.RegistryService}
15 registry_service = registry.RegistryService.new_factory(reg)
16 application = wsgi_service.service_app(registry_service,
17 '/protorpc',
18 protocols=protocols)
19
20
21 def main():
22 util.run_bare_wsgi_app(application)
23
24
25 if __name__ == '__main__':
26 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698