11================================================================================
2- - Let you focus on data, instead of format
2+ pyexcel-odsr - Let you focus on data, instead of ods format
33================================================================================
44
55.. image :: https://raw.githubusercontent.com/pyexcel/pyexcel.github.io/master/images/patreon.png
88.. image :: https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg
99 :target: https://awesome-python.com/#specific-formats-processing
1010
11- .. image :: https://travis-ci.org// .svg?branch=
12- :target: http://travis-ci.org//
11+ .. image :: https://travis-ci.org/pyexcel/pyexcel-odsr .svg?branch=master
12+ :target: http://travis-ci.org/pyexcel/pyexcel-odsr
1313
14- .. image :: https://codecov.io/gh// /branch/master/graph/badge.svg
15- :target: https://codecov.io/gh//
14+ .. image :: https://codecov.io/gh/pyexcel/pyexcel-odsr /branch/master/graph/badge.svg
15+ :target: https://codecov.io/gh/pyexcel/pyexcel-odsr
1616
17- .. image :: https://badge.fury.io/py/.svg
18- :target: https://pypi.org/project/
17+ .. image :: https://badge.fury.io/py/pyexcel-odsr .svg
18+ :target: https://pypi.org/project/pyexcel-odsr
1919
2020
21- .. image :: https://pepy.tech/badge//month
22- :target: https://pepy.tech/project//month
21+ .. image :: https://pepy.tech/badge/pyexcel-odsr /month
22+ :target: https://pepy.tech/project/pyexcel-odsr /month
2323
2424
2525.. image :: https://img.shields.io/gitter/room/gitterHQ/gitter.svg
@@ -66,19 +66,19 @@ Installation
6666================================================================================
6767
6868
69- You can install via pip:
69+ You can install pyexcel-odsr via pip:
7070
7171.. code-block :: bash
7272
73- $ pip install
73+ $ pip install pyexcel-odsr
7474
7575
7676 or clone it and install it:
7777
7878.. code-block :: bash
7979
80- $ git clone https://github.com// .git
81- $ cd
80+ $ git clone https://github.com/pyexcel/pyexcel-odsr .git
81+ $ cd pyexcel-odsr
8282 $ python setup.py install
8383
8484 Usage
@@ -110,18 +110,18 @@ As a standalone library
110110 >>> data = OrderedDict() # from collections import OrderedDict
111111 >>> data.update({" Sheet 1" : [[1 , 2 , 3 ], [4 , 5 , 6 ]]})
112112 >>> data.update({" Sheet 2" : [[" row 1" , " row 2" , " row 3" ]]})
113- >>> save_data(" your_file." , data)
113+ >>> save_data(" your_file.ods " , data)
114114
115115
116- Read from an file
116+ Read from an ods file
117117********************************************************************************
118118
119119Here's the sample code:
120120
121121.. code-block :: python
122122
123- >> > from pyexcel_ import get_data
124- >> > data = get_data(" your_file." )
123+ >> > from pyexcel_odsr import get_data
124+ >> > data = get_data(" your_file.ods " )
125125 >> > import json
126126 >> > print (json.dumps(data))
127127 {" Sheet 1" : [[1 , 2 , 3 ], [4 , 5 , 6 ]], " Sheet 2" : [[" row 1" , " row 2" , " row 3" ]]}
@@ -144,16 +144,16 @@ Here's the sample code:
144144
145145
146146
147- Read from an from memory
147+ Read from an ods from memory
148148********************************************************************************
149149
150150Continue from previous example:
151151
152152.. code-block :: python
153153
154154 >> > # This is just an illustration
155- >> > # In reality, you might deal with file upload
156- >> > # where you will read from requests.FILES['YOUR__FILE ']
155+ >> > # In reality, you might deal with ods file upload
156+ >> > # where you will read from requests.FILES['YOUR_ODS_FILE ']
157157 >> > data = get_data(io)
158158 >> > print (json.dumps(data))
159159 {" Sheet 1" : [[1 , 2 , 3 ], [4 , 5 , 6 ]], " Sheet 2" : [[7 , 8 , 9 ], [10 , 11 , 12 ]]}
@@ -164,7 +164,7 @@ Pagination feature
164164
165165
166166
167- Let's assume the following file is a huge file:
167+ Let's assume the following file is a huge ods file:
168168
169169.. code-block :: python
170170
@@ -179,29 +179,29 @@ Let's assume the following file is a huge file:
179179 >> > sheetx = {
180180 ... " huge" : huge_data
181181 ... }
182- >> > save_data(" huge_file." , sheetx)
182+ >> > save_data(" huge_file.ods " , sheetx)
183183
184184 And let's pretend to read partial data:
185185
186186.. code-block :: python
187187
188- >> > partial_data = get_data(" huge_file." , start_row = 2 , row_limit = 3 )
188+ >> > partial_data = get_data(" huge_file.ods " , start_row = 2 , row_limit = 3 )
189189 >> > print (json.dumps(partial_data))
190190 {" huge" : [[3 , 23 , 33 ], [4 , 24 , 34 ], [5 , 25 , 35 ]]}
191191
192192 And you could as well do the same for columns:
193193
194194.. code-block :: python
195195
196- >> > partial_data = get_data(" huge_file." , start_column = 1 , column_limit = 2 )
196+ >> > partial_data = get_data(" huge_file.ods " , start_column = 1 , column_limit = 2 )
197197 >> > print (json.dumps(partial_data))
198198 {" huge" : [[21 , 31 ], [22 , 32 ], [23 , 33 ], [24 , 34 ], [25 , 35 ], [26 , 36 ]]}
199199
200200 Obvious, you could do both at the same time:
201201
202202.. code-block :: python
203203
204- >> > partial_data = get_data(" huge_file." ,
204+ >> > partial_data = get_data(" huge_file.ods " ,
205205 ... start_row = 2 , row_limit = 3 ,
206206 ... start_column = 1 , column_limit = 2 )
207207 >> > print (json.dumps(partial_data))
@@ -210,26 +210,26 @@ Obvious, you could do both at the same time:
210210 .. testcode ::
211211 :hide:
212212
213- >>> os.unlink(" huge_file." )
213+ >>> os.unlink(" huge_file.ods " )
214214
215215
216216As a pyexcel plugin
217217--------------------------------------------------------------------------------
218218
219219No longer, explicit import is needed since pyexcel version 0.2.2. Instead,
220- this library is auto-loaded. So if you want to read data in format,
220+ this library is auto-loaded. So if you want to read data in ods format,
221221installing it is enough.
222222
223223
224- Reading from an file
224+ Reading from an ods file
225225********************************************************************************
226226
227227Here is the sample code:
228228
229229.. code-block :: python
230230
231231 >> > import pyexcel as pe
232- >> > sheet = pe.get_book(file_name = " your_file." )
232+ >> > sheet = pe.get_book(file_name = " your_file.ods " )
233233 >> > sheet
234234 Sheet 1 :
235235 + -- -+ -- -+ -- -+
@@ -247,24 +247,24 @@ Here is the sample code:
247247 .. testcode ::
248248 :hide:
249249
250- >>> sheet.save_as(" another_file." )
250+ >>> sheet.save_as(" another_file.ods " )
251251
252252
253253
254254Reading from a IO instance
255255********************************************************************************
256256
257- You got to wrap the binary content with stream to get working:
257+ You got to wrap the binary content with stream to get ods working:
258258
259259.. code-block :: python
260260
261261 >> > # This is just an illustration
262- >> > # In reality, you might deal with file upload
263- >> > # where you will read from requests.FILES['YOUR__FILE ']
264- >> > file = " another_file."
265- >> > with open (file , " rb" ) as f:
262+ >> > # In reality, you might deal with ods file upload
263+ >> > # where you will read from requests.FILES['YOUR_ODS_FILE ']
264+ >> > odsfile = " another_file.ods "
265+ >> > with open (odsfile , " rb" ) as f:
266266 ... content = f.read()
267- ... r = pe.get_book(file_type = " " , file_content = content)
267+ ... r = pe.get_book(file_type = " ods " , file_content = content)
268268 ... print (r)
269269 ...
270270 Sheet 1 :
@@ -284,15 +284,15 @@ You got to wrap the binary content with stream to get working:
284284 License
285285================================================================================
286286
287- License
287+ New BSD License
288288
289289Developer guide
290290==================
291291
292292Development steps for code changes
293293
294- #. git clone https://github.com/pyexcel/.git
295- #. cd
294+ #. git clone https://github.com/pyexcel/pyexcel-odsr .git
295+ #. cd pyexcel-odsr
296296
297297Upgrade your setup tools and pip. They are needed for development and testing only:
298298
@@ -349,5 +349,5 @@ This library is based on the ods of messytables, Open Knowledge Foundation Ltd.
349349 :hide:
350350
351351 >>> import os
352- >>> os.unlink(" your_file." )
353- >>> os.unlink(" another_file." )
352+ >>> os.unlink(" your_file.ods " )
353+ >>> os.unlink(" another_file.ods " )
0 commit comments