Skip to content

Commit

Permalink
Merge branch 'j0bekt01-main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kuethe committed Sep 6, 2024
2 parents e992d42 + 19a049f commit d13ce04
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pytabulator/tabulator_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,19 @@ def add_call(self, method_name: str, *args) -> None:
self._message_queue.append(call)

def trigger_download(
self, type: Literal["csv", "json"] = "csv", file_name: str = None
self, type: Literal["csv", "json", "xlsx"] = "csv", file_name: str = None, *args
) -> None:
"""Trigger download
Args:
type (str): The data type of file to be downloaded.
type (str): The data type of the file to be downloaded.
file_name (str): The file name.
*args (any): The arguments to be passed to the `table.download` method.
"""
if not file_name:
file_name = f"tabulator-data.{type}"

self.add_call("download", type, file_name)
self.add_call("download", type, file_name, *args)

def add_row(self, row: dict = {}) -> None:
"""Add a row to the table
Expand Down

0 comments on commit d13ce04

Please sign in to comment.