Skip to content

Commit 6c899d9

Browse files
committed
minor update
1 parent 85e5b1e commit 6c899d9

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

pyexcel_webio/__init__.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def get_book_dict(self, **keywords):
134134
else:
135135
return None
136136

137-
def save_book_to_database(self, session, tables, **keywords):
137+
def save_book_to_database(self, session=None, tables=None, **keywords):
138138
book = self.load_book(**keywords)
139139
if book:
140140
book.save_to_database(session, tables)
@@ -148,6 +148,22 @@ def dummy_func(content, content_type=None, status=200):
148148

149149

150150
def make_response(pyexcel_instance, file_type, status=200, **keywords):
151+
"""Make a http response from a pyexcel instance of :class:`~pyexcel.Sheet` or :class:`~pyexcel.Book`
152+
153+
:param pyexcel_instance: pyexcel.Sheet or pyexcel.Book
154+
:param file_type: one of the following strings:
155+
156+
* 'csv'
157+
* 'tsv'
158+
* 'csvz'
159+
* 'tsvz'
160+
* 'xls'
161+
* 'xlsx'
162+
* 'xlsm'
163+
* 'ods'
164+
165+
:param status: unless a different status is to be returned.
166+
"""
151167
io = BytesIO()
152168
pyexcel_instance.save_to_memory(file_type, io, **keywords)
153169
io.seek(0)

0 commit comments

Comments
 (0)