Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
added sample_reports action
Browse files Browse the repository at this point in the history
  • Loading branch information
emrodas10 committed Aug 30, 2019
1 parent b679d2a commit 8460726
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/basics/1.0.0/api.yaml
Expand Up @@ -89,3 +89,8 @@ actions:
returns:
schema:
type: object
- name: sample_report_data
description: Outputs a string in the correct formatting that reports expects.
returns:
schema:
type: string
5 changes: 5 additions & 0 deletions apps/basics/1.0.0/src/app.py
Expand Up @@ -66,6 +66,11 @@ async def echo_json(self, data):
await self.console_logger.info(f"Echoing JSON: {data}")
return data

async def sample_report_data(self):
message = f"Alpha,Beta,Charlie\n1,2,3\n4,5,6\n1,2,3\n4,5,6\n1,2,3\n4,5,6\n1,2,3\n4,5,6\n1,2,3\n4,5,6\n1,2,3\n4,5,6\n1,2,3\n4,5,6\n1,2,3\n4,5,6"
self.logger.info(message)
await self.console_logger.info(message)
return message

if __name__ == "__main__":
asyncio.run(Basics.run(), debug=True)

0 comments on commit 8460726

Please sign in to comment.