@@ -8,16 +8,14 @@ pyexcel-xlsxw - Let you focus on data, instead of xlsx 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-xlsxw/workflows/run_tests/badge.svg
12
- :target: http://github.com/pyexcel/pyexcel-xlsxw/actions
13
-
14
11
.. image :: https://codecov.io/gh/pyexcel/pyexcel-xlsxw/branch/master/graph/badge.svg
15
12
:target: https://codecov.io/gh/pyexcel/pyexcel-xlsxw
16
13
17
14
.. image :: https://badge.fury.io/py/pyexcel-xlsxw.svg
18
15
:target: https://pypi.org/project/pyexcel-xlsxw
19
16
20
17
18
+
21
19
.. image :: https://pepy.tech/badge/pyexcel-xlsxw/month
22
20
:target: https://pepy.tech/project/pyexcel-xlsxw
23
21
@@ -38,19 +36,11 @@ pyexcel-xlsxw - Let you focus on data, instead of xlsx format
38
36
Support the project
39
37
================================================================================
40
38
41
- If your company has embedded pyexcel and its components into a revenue generating
42
- product, please support me on github, `patreon <https://www.patreon.com/bePatron?u=5537627 >`_
43
- or `bounty source <https://salt.bountysource.com/teams/chfw-pyexcel >`_ to maintain
44
- the project and develop it further.
45
-
46
- If you are an individual, you are welcome to support me too and for however long
47
- you feel like. As my backer, you will receive
48
- `early access to pyexcel related contents <https://www.patreon.com/pyexcel/posts >`_.
49
-
50
- And your issues will get prioritized if you would like to become my patreon as `pyexcel pro user `.
51
-
52
- With your financial support, I will be able to invest
53
- a little bit more time in coding, documentation and writing interesting posts.
39
+ If your company uses pyexcel and its components in a revenue-generating product,
40
+ please consider supporting the project on GitHub or
41
+ `Patreon <https://www.patreon.com/bePatron?u=5537627 >`_. Your financial
42
+ support will enable me to dedicate more time to coding, improving documentation,
43
+ and creating engaging content.
54
44
55
45
56
46
Known constraints
@@ -90,15 +80,8 @@ As a standalone library
90
80
91
81
>>> import os
92
82
>>> import sys
93
- >>> if sys.version_info[0 ] < 3 :
94
- ... from StringIO import StringIO
95
- ... else :
96
- ... from io import BytesIO as StringIO
97
- >>> PY2 = sys.version_info[0 ] == 2
98
- >>> if PY2 and sys.version_info[1 ] < 7 :
99
- ... from ordereddict import OrderedDict
100
- ... else :
101
- ... from collections import OrderedDict
83
+ >>> from io import BytesIO
84
+ >>> from collections import OrderedDict
102
85
103
86
104
87
Write to an xlsx file
@@ -140,7 +123,7 @@ Here's the sample code to write a dictionary to an xlsx file:
140
123
>> > data = OrderedDict()
141
124
>> > data.update({" Sheet 1" : [[1 , 2 , 3 ], [4 , 5 , 6 ]]})
142
125
>> > data.update({" Sheet 2" : [[7 , 8 , 9 ], [10 , 11 , 12 ]]})
143
- >> > io = StringIO ()
126
+ >> > io = BytesIO ()
144
127
>> > save_data(io, data)
145
128
>> > # do something with the io
146
129
>> > # In reality, you might give it to your http response
@@ -200,18 +183,18 @@ Here is the sample code:
200
183
>> > sheet.save_as(" another_file.xlsx" )
201
184
202
185
203
- Writing to a StringIO instance
186
+ Writing to a BytesIO instance
204
187
********************************************************************************
205
188
206
- You need to pass a StringIO instance to Writer:
189
+ You need to pass a BytesIO instance to Writer:
207
190
208
191
.. code-block :: python
209
192
210
193
>> > data = [
211
194
... [1 , 2 , 3 ],
212
195
... [4 , 5 , 6 ]
213
196
... ]
214
- >> > io = StringIO ()
197
+ >> > io = BytesIO ()
215
198
>> > sheet = pe.Sheet(data)
216
199
>> > io = sheet.save_to_memory(" xlsx" , io)
217
200
>> > # then do something with io
@@ -243,26 +226,29 @@ Then install relevant development requirements:
243
226
#. pip install -r tests/requirements.txt
244
227
245
228
Once you have finished your changes, please provide test case(s), relevant documentation
246
- and update CHANGELOG.rst.
229
+ and update changelog.yml
247
230
248
231
.. note ::
249
232
250
233
As to rnd_requirements.txt, usually, it is created when a dependent
251
- library is not released. Once the dependecy is installed
234
+ library is not released. Once the dependency is installed
252
235
(will be released), the future
253
236
version of the dependency in the requirements.txt will be valid.
254
237
255
238
256
239
How to test your contribution
257
- ------------------------------
240
+ --------------------------------------------------------------------------------
258
241
259
- 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.
242
+ Although `nose ` and `doctest ` are both used in code testing, it is advisable
243
+ that unit tests are put in tests. `doctest ` is incorporated only to make sure
244
+ the code examples in documentation remain valid across different development
245
+ releases.
260
246
261
247
On Linux/Unix systems, please launch your tests like this::
262
248
263
249
$ make
264
250
265
- On Windows systems , please issue this command::
251
+ On Windows, please issue this command::
266
252
267
253
> test.bat
268
254
@@ -274,7 +260,7 @@ Please run::
274
260
275
261
$ make format
276
262
277
- so as to beautify your code otherwise travis-ci may fail your unit test.
263
+ so as to beautify your code otherwise your build may fail your unit test.
278
264
279
265
280
266
0 commit comments