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

Unified 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, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/gsutil/third_party/protorpc/demos/experimental/wsgi/services.py
diff --git a/third_party/gsutil/third_party/protorpc/demos/experimental/wsgi/services.py b/third_party/gsutil/third_party/protorpc/demos/experimental/wsgi/services.py
new file mode 100644
index 0000000000000000000000000000000000000000..670d7cc43a056d3976673f985384bc98a9bb6f8a
--- /dev/null
+++ b/third_party/gsutil/third_party/protorpc/demos/experimental/wsgi/services.py
@@ -0,0 +1,26 @@
+from google.appengine.ext.webapp import util
+
+from protorpc.experimental import wsgi_service
+from protorpc.experimental import util as wsgi_util
+from protorpc import protobuf
+from protorpc import protojson
+
+from protorpc import registry
+
+protocols = wsgi_util.Protocols()
+protocols.add_protocol(protobuf, 'protobuf')
+protocols.add_protocol(protojson, 'json')
+
+reg = {'/protorpc': registry.RegistryService}
+registry_service = registry.RegistryService.new_factory(reg)
+application = wsgi_service.service_app(registry_service,
+ '/protorpc',
+ protocols=protocols)
+
+
+def main():
+ util.run_bare_wsgi_app(application)
+
+
+if __name__ == '__main__':
+ main()

Powered by Google App Engine
This is Rietveld 408576698