Skip to content

Commit

Permalink
docs: Update simple_schedule_plan.py example (#1463)
Browse files Browse the repository at this point in the history
Add some line wraps to make it easier to read.

Co-authored-by: John Kaster <[email protected]>
  • Loading branch information
drstrangelooker and jkaster authored Oct 21, 2024
1 parent 5e46100 commit a076c7c
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions examples/python/simple_schedule_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,32 @@ def create_simple_schedule(dashboard_id:int,user_id:int,schedule_title:str, form
### Supported formats vary by destination, but include: "txt", "csv", "inline_json", "json", "json_detail", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png"
### type: Type of the address ('email', 'webhook', 's3', or 'sftp')
schedule = sdk.create_scheduled_plan(
body=models40.WriteScheduledPlan(name=schedule_title, dashboard_id=dashboard_id, user_id=user_id, run_as_recipient= True, crontab=crontab, scheduled_plan_destination = [models40.ScheduledPlanDestination(format=format, apply_formatting=True, apply_vis=True, address=email, type=type, message=message)]))
create_simple_schedule(1234,453,"This is an automated test", "assembled_pdf", "[email protected]", "email", "Hi Looker User!", "0 1 * * *")
body=models40.WriteScheduledPlan(
name=schedule_title,
dashboard_id=dashboard_id,
user_id=user_id,
run_as_recipient=True,
crontab=crontab,
scheduled_plan_destination = [
models40.ScheduledPlanDestination(
format=format,
apply_formatting=True,
apply_vis=True,
address=email,
type=type,
message=message
)
]
)
)

create_simple_schedule(
1234,
453,
"This is an automated test",
"assembled_pdf",
"[email protected]",
"email",
"Hi Looker User!",
"0 1 * * *"
)

0 comments on commit a076c7c

Please sign in to comment.