Skip to content

Commit 5719758

Browse files
committed
update api documentation
1 parent 536e67c commit 5719758

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.moban.d/docs/source/index.rst.jj2

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ dict of a list of lists :meth:`~django_excel.ExcelMixin.get_book_dict`
333333
database table :meth:`~django_excel.ExcelMixin.save_to_database` :meth:`~django_excel.make_response_from_a_table`
334334
a list of database tables :meth:`~django_excel.ExcelMixin.save_book_to_database` :meth:`~django_excel.make_response_from_tables`
335335
a database query sets :meth:`~django_excel.make_response_from_query_sets`
336+
a generator for records :meth:`~django_excel.ExcelMixin.iget_records`
337+
a generator of lists :meth:`~django_excel.ExcelMixin.iget_array`
336338
=========================== ======================================================== ===================================================
337339
{%endblock%}
338340

@@ -355,6 +357,12 @@ a database query sets
355357
:param keywords: additional keywords to pyexcel library
356358
:returns: a two dimensional array, a list of lists
357359

360+
.. method:: iget_array(sheet_name=None, **keywords)
361+
362+
:param sheet_name: same as :meth:`~django_excel.ExcelMixin.get_sheet`
363+
:param keywords: additional keywords to pyexcel library
364+
:returns: a generator for a two dimensional array, a list of lists
365+
358366
.. method:: get_dict(sheet_name=None, name_columns_by_row=0, **keywords)
359367

360368
:param sheet_name: same as :meth:`~django_excel.ExcelMixin.get_sheet`
@@ -369,6 +377,13 @@ a database query sets
369377
:param keywords: additional keywords to pyexcel library
370378
:returns: a list of dictionary of the file content
371379

380+
.. method:: iget_records(sheet_name=None, name_columns_by_row=0, **keywords)
381+
382+
:param sheet_name: same as :meth:`~django_excel.ExcelMixin.get_sheet`
383+
:param name_columns_by_row: uses the first row of the sheet to be record field names by default.
384+
:param keywords: additional keywords to pyexcel library
385+
:returns: a generator for a list of dictionary of the file content
386+
372387
.. method:: get_book(**keywords)
373388

374389
:param keywords: additional keywords to pyexcel library
@@ -393,6 +408,11 @@ a database query sets
393408
:param mapdicts: a list of explicit table column names if your excel data sheets do not have the exact column names
394409
:param keywords: additional keywords to :meth:`pyexcel.Book.save_to_django_models`
395410

411+
.. method:: free_resources()
412+
413+
It should be called after iget_array and iget_records were used
414+
415+
396416
Response methods
397417
-----------------
398418

doc/source/index.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,8 @@ dict of a list of lists :meth:`~django_excel.ExcelMixin.get_book_dict`
516516
database table :meth:`~django_excel.ExcelMixin.save_to_database` :meth:`~django_excel.make_response_from_a_table`
517517
a list of database tables :meth:`~django_excel.ExcelMixin.save_book_to_database` :meth:`~django_excel.make_response_from_tables`
518518
a database query sets :meth:`~django_excel.make_response_from_query_sets`
519+
a generator for records :meth:`~django_excel.ExcelMixin.iget_records`
520+
a generator of lists :meth:`~django_excel.ExcelMixin.iget_array`
519521
=========================== ======================================================== ===================================================
520522

521523
See more examples of the data structures in :ref:`pyexcel documentation<pyexcel:a-list-of-data-structures>`
@@ -541,6 +543,12 @@ API Reference
541543
:param keywords: additional keywords to pyexcel library
542544
:returns: a two dimensional array, a list of lists
543545

546+
.. method:: iget_array(sheet_name=None, **keywords)
547+
548+
:param sheet_name: same as :meth:`~django_excel.ExcelMixin.get_sheet`
549+
:param keywords: additional keywords to pyexcel library
550+
:returns: a generator for a two dimensional array, a list of lists
551+
544552
.. method:: get_dict(sheet_name=None, name_columns_by_row=0, **keywords)
545553

546554
:param sheet_name: same as :meth:`~django_excel.ExcelMixin.get_sheet`
@@ -555,6 +563,13 @@ API Reference
555563
:param keywords: additional keywords to pyexcel library
556564
:returns: a list of dictionary of the file content
557565

566+
.. method:: iget_records(sheet_name=None, name_columns_by_row=0, **keywords)
567+
568+
:param sheet_name: same as :meth:`~django_excel.ExcelMixin.get_sheet`
569+
:param name_columns_by_row: uses the first row of the sheet to be record field names by default.
570+
:param keywords: additional keywords to pyexcel library
571+
:returns: a generator for a list of dictionary of the file content
572+
558573
.. method:: get_book(**keywords)
559574

560575
:param keywords: additional keywords to pyexcel library
@@ -579,6 +594,11 @@ API Reference
579594
:param mapdicts: a list of explicit table column names if your excel data sheets do not have the exact column names
580595
:param keywords: additional keywords to :meth:`pyexcel.Book.save_to_django_models`
581596

597+
.. method:: free_resources()
598+
599+
It should be called after iget_array and iget_records were used
600+
601+
582602
Response methods
583603
-----------------
584604

0 commit comments

Comments
 (0)