@@ -8,9 +8,6 @@ pyexcel-ods3 - Let you focus on data, instead of ods format
8
8
.. image :: https://raw.githubusercontent.com/pyexcel/pyexcel-mobans/master/images/awesome-badge.svg
9
9
:target: https://awesome-python.com/#specific-formats-processing
10
10
11
- .. image :: https://github.com/pyexcel/pyexcel-ods3/workflows/run_tests/badge.svg
12
- :target: http://github.com/pyexcel/pyexcel-ods3/actions
13
-
14
11
.. image :: https://codecov.io/gh/pyexcel/pyexcel-ods3/branch/master/graph/badge.svg
15
12
:target: https://codecov.io/gh/pyexcel/pyexcel-ods3
16
13
@@ -20,6 +17,7 @@ pyexcel-ods3 - Let you focus on data, instead of ods format
20
17
.. image :: https://anaconda.org/conda-forge/pyexcel-ods3/badges/version.svg
21
18
:target: https://anaconda.org/conda-forge/pyexcel-ods3
22
19
20
+
23
21
.. image :: https://pepy.tech/badge/pyexcel-ods3/month
24
22
:target: https://pepy.tech/project/pyexcel-ods3
25
23
@@ -45,19 +43,11 @@ that has no external dependency but do ods reading only
45
43
Support the project
46
44
================================================================================
47
45
48
- If your company has embedded pyexcel and its components into a revenue generating
49
- product, please support me on github, `patreon <https://www.patreon.com/bePatron?u=5537627 >`_
50
- or `bounty source <https://salt.bountysource.com/teams/chfw-pyexcel >`_ to maintain
51
- the project and develop it further.
52
-
53
- If you are an individual, you are welcome to support me too and for however long
54
- you feel like. As my backer, you will receive
55
- `early access to pyexcel related contents <https://www.patreon.com/pyexcel/posts >`_.
56
-
57
- And your issues will get prioritized if you would like to become my patreon as `pyexcel pro user `.
58
-
59
- With your financial support, I will be able to invest
60
- a little bit more time in coding, documentation and writing interesting posts.
46
+ If your company uses pyexcel and its components in a revenue-generating product,
47
+ please consider supporting the project on GitHub or
48
+ `Patreon <https://www.patreon.com/bePatron?u=5537627 >`_. Your financial
49
+ support will enable me to dedicate more time to coding, improving documentation,
50
+ and creating engaging content.
61
51
62
52
63
53
Known constraints
@@ -97,15 +87,8 @@ As a standalone library
97
87
98
88
>>> import os
99
89
>>> import sys
100
- >>> if sys.version_info[0 ] < 3 :
101
- ... from StringIO import StringIO
102
- ... else :
103
- ... from io import BytesIO as StringIO
104
- >>> PY2 = sys.version_info[0 ] == 2
105
- >>> if PY2 and sys.version_info[1 ] < 7 :
106
- ... from ordereddict import OrderedDict
107
- ... else :
108
- ... from collections import OrderedDict
90
+ >>> from io import BytesIO
91
+ >>> from collections import OrderedDict
109
92
110
93
111
94
Write to an ods file
@@ -149,7 +132,7 @@ Here's the sample code to write a dictionary to an ods file:
149
132
>> > data = OrderedDict()
150
133
>> > data.update({" Sheet 1" : [[1 , 2 , 3 ], [4 , 5 , 6 ]]})
151
134
>> > data.update({" Sheet 2" : [[7 , 8 , 9 ], [10 , 11 , 12 ]]})
152
- >> > io = StringIO ()
135
+ >> > io = BytesIO ()
153
136
>> > save_data(io, data)
154
137
>> > # do something with the io
155
138
>> > # In reality, you might give it to your http response
@@ -305,18 +288,18 @@ You got to wrap the binary content with stream to get ods working:
305
288
+ ------ -+ ------ -+ ------ -+
306
289
307
290
308
- Writing to a StringIO instance
291
+ Writing to a BytesIO instance
309
292
********************************************************************************
310
293
311
- You need to pass a StringIO instance to Writer:
294
+ You need to pass a BytesIO instance to Writer:
312
295
313
296
.. code-block :: python
314
297
315
298
>> > data = [
316
299
... [1 , 2 , 3 ],
317
300
... [4 , 5 , 6 ]
318
301
... ]
319
- >> > io = StringIO ()
302
+ >> > io = BytesIO ()
320
303
>> > sheet = pe.Sheet(data)
321
304
>> > io = sheet.save_to_memory(" ods" , io)
322
305
>> > # then do something with io
@@ -353,15 +336,18 @@ and update changelog.yml
353
336
.. note ::
354
337
355
338
As to rnd_requirements.txt, usually, it is created when a dependent
356
- library is not released. Once the dependecy is installed
339
+ library is not released. Once the dependency is installed
357
340
(will be released), the future
358
341
version of the dependency in the requirements.txt will be valid.
359
342
360
343
361
344
How to test your contribution
362
- ------------------------------
345
+ --------------------------------------------------------------------------------
363
346
364
- Although `nose ` and `doctest ` are both used in code testing, it is adviable that unit tests are put in tests. `doctest ` is incorporated only to make sure the code examples in documentation remain valid across different development releases.
347
+ Although `nose ` and `doctest ` are both used in code testing, it is advisable
348
+ that unit tests are put in tests. `doctest ` is incorporated only to make sure
349
+ the code examples in documentation remain valid across different development
350
+ releases.
365
351
366
352
On Linux/Unix systems, please launch your tests like this::
367
353
0 commit comments