Commit b1dbb5d0 authored by mouadh's avatar mouadh

format

parent 7a5c977e
...@@ -22,20 +22,22 @@ class OlapyService(ServiceBase): ...@@ -22,20 +22,22 @@ class OlapyService(ServiceBase):
@rpc(_returns=Unicode) @rpc(_returns=Unicode)
def get_tables(ctx): def get_tables(ctx):
return {table_name: table_dataframe.to_json() for table_name, table_dataframe in return {
OlapyService.executer.tables_loaded.items()} table_name: table_dataframe.to_json()
for table_name, table_dataframe in
OlapyService.executer.tables_loaded.items()
}
@rpc(_returns=Iterable(Unicode)) @rpc(_returns=Iterable(Unicode))
def get_measures(ctx): def get_measures(ctx):
return OlapyService.executer.measures return OlapyService.executer.measures
application = Application([OlapyService],
tns='spyne.olapy.services',
in_protocol=HttpRpc(validator='soft'),
out_protocol=JsonDocument()
)
application = Application(
[OlapyService],
tns='spyne.olapy.services',
in_protocol=HttpRpc(validator='soft'),
out_protocol=JsonDocument())
if __name__ == '__main__': if __name__ == '__main__':
# You can use any Wsgi server. Here, we chose # You can use any Wsgi server. Here, we chose
...@@ -45,4 +47,4 @@ if __name__ == '__main__': ...@@ -45,4 +47,4 @@ if __name__ == '__main__':
wsgi_app = WsgiApplication(application) wsgi_app = WsgiApplication(application)
server = make_server('0.0.0.0', 8000, wsgi_app) server = make_server('0.0.0.0', 8000, wsgi_app)
server.serve_forever() server.serve_forever()
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment