xlsxlite 0.2.0__tar.gz → 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of xlsxlite might be problematic. Click here for more details.

xlsxlite-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020-2022 TextIt
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,13 @@
1
+ Metadata-Version: 2.3
2
+ Name: xlsxlite
3
+ Version: 1.0.0
4
+ Summary: Lightweight XLSX writer with emphasis on minimizing memory usage.
5
+ License: MIT
6
+ Author: TextIt
7
+ Author-email: code@textit.com
8
+ Requires-Python: >=3.10
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python
13
+ Project-URL: repository, http://github.com/nyaruka/xlsxlite
@@ -0,0 +1,32 @@
1
+ [project]
2
+ name = "xlsxlite"
3
+ version = "1.0.0"
4
+ description = "Lightweight XLSX writer with emphasis on minimizing memory usage."
5
+ authors = [
6
+ {"name" = "TextIt", "email" = "code@textit.com"}
7
+ ]
8
+ license = "MIT"
9
+ classifiers=[
10
+ 'Intended Audience :: Developers',
11
+ 'License :: OSI Approved :: MIT License',
12
+ 'Operating System :: OS Independent',
13
+ 'Programming Language :: Python',
14
+ ]
15
+ requires-python = ">=3.10"
16
+ dependencies = []
17
+
18
+ [tool.poetry.urls]
19
+ repository = "http://github.com/nyaruka/xlsxlite"
20
+
21
+ [tool.poetry.group.dev.dependencies]
22
+ pytest = "^8.3.4"
23
+ pytest-cov = "^6.0.0"
24
+ pytz = "^2024.2"
25
+ XlsxWriter = "^3.2.0"
26
+ openpyxl = "3.1.5"
27
+ lxml = "^5.3.0"
28
+ flake8 = "^7.1.1"
29
+
30
+ [build-system]
31
+ requires = ["poetry-core>=2.0.0,<3.0.0"]
32
+ build-backend = "poetry.core.masonry.api"
File without changes
@@ -3,10 +3,10 @@ import random
3
3
  import string
4
4
  import xlsxwriter
5
5
 
6
- from mock import patch
7
6
  from openpyxl import Workbook
8
- from openpyxl.worksheet.write_only import WriteOnlyCell
9
- from openpyxl.writer.etree_worksheet import etree_write_cell
7
+ from openpyxl.cell.cell import WriteOnlyCell
8
+ from openpyxl.cell._writer import etree_write_cell
9
+ from unittest.mock import patch
10
10
  from xlsxlite.writer import XLSXBook
11
11
  from .base import tests_dir # noqa
12
12
 
@@ -32,7 +32,7 @@ def test_xlxslite():
32
32
 
33
33
 
34
34
  @pytest.mark.usefixtures("tests_dir")
35
- @patch("openpyxl.worksheet.write_only.write_cell")
35
+ @patch("openpyxl.cell._writer.write_cell")
36
36
  def test_openpyxl_etree(mock_write_cell):
37
37
  mock_write_cell.side_effect = etree_write_cell
38
38
 
@@ -1,9 +1,8 @@
1
1
  from datetime import datetime, timedelta
2
2
 
3
3
  import pytest
4
- from mock import patch
5
4
  from openpyxl.reader.excel import load_workbook
6
-
5
+ from unittest.mock import patch
7
6
  from xlsxlite.writer import XLSXBook
8
7
 
9
8
  from .base import XLSXTest, tests_dir # noqa
@@ -41,9 +40,9 @@ class BookTest(XLSXTest):
41
40
  assert sheet2.title == "People"
42
41
  assert sheet3.title == "Empty"
43
42
 
44
- self.assertExcelSheet(sheet1, [()])
43
+ self.assertExcelSheet(sheet1, [])
45
44
  self.assertExcelSheet(sheet2, [("Name", "Email"), ("Jim", "jim@acme.com"), ("Bob", "bob@acme.com")])
46
- self.assertExcelSheet(sheet3, [()])
45
+ self.assertExcelSheet(sheet3, [])
47
46
 
48
47
  def test_cell_types(self):
49
48
  d1 = datetime(2013, 1, 1, 12, 0, 0)
xlsxlite-0.2.0/PKG-INFO DELETED
@@ -1,67 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: xlsxlite
3
- Version: 0.2.0
4
- Summary: Lightweight XLSX writer with emphasis on minimizing memory usage.
5
- Home-page: http://github.com/nyaruka/xlxslite
6
- Author: Nyaruka
7
- Author-email: code@nyaruka.com
8
- License: MIT
9
- Project-URL: Bug Reports, https://github.com/nyaruka/xlsxlite/issues
10
- Project-URL: Source, https://github.com/nyaruka/xlsxlite/
11
- Description: # XLSXLite
12
-
13
- [![Build Status](https://travis-ci.org/nyaruka/xlsxlite.svg?branch=master)](https://travis-ci.org/nyaruka/xlsxlite)
14
- [![Coverage Status](https://coveralls.io/repos/github/nyaruka/xlsxlite/badge.svg?branch=master)](https://coveralls.io/github/nyaruka/xlsxlite?branch=master)
15
- [![PyPI Release](https://img.shields.io/pypi/v/xlsxlite.svg)](https://pypi.python.org/pypi/xlsxlite/)
16
-
17
- This is a lightweight XLSX writer with emphasis on minimizing memory usage. It's also really fast.
18
-
19
- ```python
20
- from xlsxlite.writer import XLSXBook
21
- book = XLSXBook()
22
- sheet1 = book.add_sheet("People")
23
- sheet1.append_row("Name", "Email", "Age")
24
- sheet1.append_row("Jim", "jim@acme.com", 45)
25
- book.finalize(to_file="simple.xlsx")
26
- ```
27
-
28
- ## Benchmarks
29
-
30
- The [benchmarking test](https://github.com/nyaruka/xlsxlite/blob/master/xlsxlite/test/test_perf.py) writes
31
- rows with 10 cells of random string data to a single sheet workbook. The table below gives the times in seconds (lower is better)
32
- to write a spreadsheet with the given number of rows, and includes [xlxswriter](https://xlsxwriter.readthedocs.io/) and
33
- [openpyxl](https://openpyxl.readthedocs.io/) for comparison.
34
-
35
- Implementation | 100,000 rows | 1,000,000 rows
36
- ----------------|--------------|---------------
37
- openpyxl | 43.5 | 469.1
38
- openpyxl + lxml | 21.1 | 226.3
39
- xlsxwriter | 17.2 | 186.2
40
- xlsxlite | 1.9 | 19.2
41
-
42
- ## Limitations
43
-
44
- This library is for projects which need to generate large spreadsheets, quickly, for the purposes of data exchange, and
45
- so it intentionally only supports a tiny subset of SpreadsheetML specification:
46
-
47
- * No styling or themes
48
- * Only strings, numbers, booleans and dates are supported cell types
49
-
50
- If you need to do anything fancier then take a look at [xlxswriter](https://xlsxwriter.readthedocs.io/) and
51
- [openpyxl](https://openpyxl.readthedocs.io/).
52
-
53
- ## Development
54
-
55
- To run all tests:
56
-
57
- ```
58
- py.test xlsxlite -s
59
- ```
60
-
61
- Keywords: excel xlxs
62
- Platform: UNKNOWN
63
- Classifier: Intended Audience :: Developers
64
- Classifier: License :: OSI Approved :: MIT License
65
- Classifier: Operating System :: OS Independent
66
- Classifier: Programming Language :: Python
67
- Description-Content-Type: text/markdown
xlsxlite-0.2.0/README.md DELETED
@@ -1,49 +0,0 @@
1
- # XLSXLite
2
-
3
- [![Build Status](https://travis-ci.org/nyaruka/xlsxlite.svg?branch=master)](https://travis-ci.org/nyaruka/xlsxlite)
4
- [![Coverage Status](https://coveralls.io/repos/github/nyaruka/xlsxlite/badge.svg?branch=master)](https://coveralls.io/github/nyaruka/xlsxlite?branch=master)
5
- [![PyPI Release](https://img.shields.io/pypi/v/xlsxlite.svg)](https://pypi.python.org/pypi/xlsxlite/)
6
-
7
- This is a lightweight XLSX writer with emphasis on minimizing memory usage. It's also really fast.
8
-
9
- ```python
10
- from xlsxlite.writer import XLSXBook
11
- book = XLSXBook()
12
- sheet1 = book.add_sheet("People")
13
- sheet1.append_row("Name", "Email", "Age")
14
- sheet1.append_row("Jim", "jim@acme.com", 45)
15
- book.finalize(to_file="simple.xlsx")
16
- ```
17
-
18
- ## Benchmarks
19
-
20
- The [benchmarking test](https://github.com/nyaruka/xlsxlite/blob/master/xlsxlite/test/test_perf.py) writes
21
- rows with 10 cells of random string data to a single sheet workbook. The table below gives the times in seconds (lower is better)
22
- to write a spreadsheet with the given number of rows, and includes [xlxswriter](https://xlsxwriter.readthedocs.io/) and
23
- [openpyxl](https://openpyxl.readthedocs.io/) for comparison.
24
-
25
- Implementation | 100,000 rows | 1,000,000 rows
26
- ----------------|--------------|---------------
27
- openpyxl | 43.5 | 469.1
28
- openpyxl + lxml | 21.1 | 226.3
29
- xlsxwriter | 17.2 | 186.2
30
- xlsxlite | 1.9 | 19.2
31
-
32
- ## Limitations
33
-
34
- This library is for projects which need to generate large spreadsheets, quickly, for the purposes of data exchange, and
35
- so it intentionally only supports a tiny subset of SpreadsheetML specification:
36
-
37
- * No styling or themes
38
- * Only strings, numbers, booleans and dates are supported cell types
39
-
40
- If you need to do anything fancier then take a look at [xlxswriter](https://xlsxwriter.readthedocs.io/) and
41
- [openpyxl](https://openpyxl.readthedocs.io/).
42
-
43
- ## Development
44
-
45
- To run all tests:
46
-
47
- ```
48
- py.test xlsxlite -s
49
- ```
xlsxlite-0.2.0/setup.cfg DELETED
@@ -1,29 +0,0 @@
1
- [flake8]
2
- max-line-length = 120
3
- filename = *.py,*.py.dev
4
- exclude = ./env/*,./config/*,./fab*,.git/*,static/bower/*,sitestatic/bower/,*/gen/*
5
- ignore = E501,F405,T003,E203,W503
6
-
7
- [isort]
8
- multi_line_output = 3
9
- including_trailing_comma = True
10
- force_grid_wrap = 0
11
- line_length = 119
12
- include_trailing_comma = True
13
- combine_as_imports = True
14
- sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
15
-
16
- [coverage:run]
17
- source = xlsxlite
18
- omit = xlsxlite/test/*
19
-
20
- [metadata]
21
- license_file = LICENSE
22
-
23
- [bdist_wheel]
24
- universal = 1
25
-
26
- [egg_info]
27
- tag_build =
28
- tag_date = 0
29
-
xlsxlite-0.2.0/setup.py DELETED
@@ -1,53 +0,0 @@
1
- # Always prefer setuptools over distutils
2
- from setuptools import setup, find_packages
3
- from os import path
4
-
5
- here = path.abspath(path.dirname(__file__))
6
-
7
- # Get the long description from the README file
8
- with open(path.join(here, 'README.md'), encoding='utf-8') as f:
9
- long_description = f.read()
10
-
11
-
12
- def _is_requirement(line):
13
- """Returns whether the line is a valid package requirement."""
14
- line = line.strip()
15
- return line and not line.startswith("#")
16
-
17
-
18
- def _read_requirements(filename):
19
- """Parses a file for pip installation requirements."""
20
- with open(filename) as requirements_file:
21
- contents = requirements_file.read()
22
- return [line.strip() for line in contents.splitlines() if _is_requirement(line)]
23
-
24
-
25
- setup(
26
- name='xlsxlite',
27
- version=__import__('xlsxlite').__version__,
28
- description='Lightweight XLSX writer with emphasis on minimizing memory usage.',
29
- long_description=long_description,
30
- long_description_content_type='text/markdown',
31
-
32
- classifiers=[
33
- 'Intended Audience :: Developers',
34
- 'License :: OSI Approved :: MIT License',
35
- 'Operating System :: OS Independent',
36
- 'Programming Language :: Python'
37
- ],
38
- keywords='excel xlxs',
39
- url='http://github.com/nyaruka/xlxslite',
40
- license='MIT',
41
-
42
- author='Nyaruka',
43
- author_email='code@nyaruka.com',
44
-
45
- packages=find_packages(),
46
- install_requires=_read_requirements("requirements/base.txt"),
47
- tests_require=_read_requirements("requirements/tests.txt"),
48
-
49
- project_urls={
50
- 'Bug Reports': 'https://github.com/nyaruka/xlsxlite/issues',
51
- 'Source': 'https://github.com/nyaruka/xlsxlite/',
52
- },
53
- )
@@ -1 +0,0 @@
1
- __version__ = "0.2.0"
@@ -1,67 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: xlsxlite
3
- Version: 0.2.0
4
- Summary: Lightweight XLSX writer with emphasis on minimizing memory usage.
5
- Home-page: http://github.com/nyaruka/xlxslite
6
- Author: Nyaruka
7
- Author-email: code@nyaruka.com
8
- License: MIT
9
- Project-URL: Bug Reports, https://github.com/nyaruka/xlsxlite/issues
10
- Project-URL: Source, https://github.com/nyaruka/xlsxlite/
11
- Description: # XLSXLite
12
-
13
- [![Build Status](https://travis-ci.org/nyaruka/xlsxlite.svg?branch=master)](https://travis-ci.org/nyaruka/xlsxlite)
14
- [![Coverage Status](https://coveralls.io/repos/github/nyaruka/xlsxlite/badge.svg?branch=master)](https://coveralls.io/github/nyaruka/xlsxlite?branch=master)
15
- [![PyPI Release](https://img.shields.io/pypi/v/xlsxlite.svg)](https://pypi.python.org/pypi/xlsxlite/)
16
-
17
- This is a lightweight XLSX writer with emphasis on minimizing memory usage. It's also really fast.
18
-
19
- ```python
20
- from xlsxlite.writer import XLSXBook
21
- book = XLSXBook()
22
- sheet1 = book.add_sheet("People")
23
- sheet1.append_row("Name", "Email", "Age")
24
- sheet1.append_row("Jim", "jim@acme.com", 45)
25
- book.finalize(to_file="simple.xlsx")
26
- ```
27
-
28
- ## Benchmarks
29
-
30
- The [benchmarking test](https://github.com/nyaruka/xlsxlite/blob/master/xlsxlite/test/test_perf.py) writes
31
- rows with 10 cells of random string data to a single sheet workbook. The table below gives the times in seconds (lower is better)
32
- to write a spreadsheet with the given number of rows, and includes [xlxswriter](https://xlsxwriter.readthedocs.io/) and
33
- [openpyxl](https://openpyxl.readthedocs.io/) for comparison.
34
-
35
- Implementation | 100,000 rows | 1,000,000 rows
36
- ----------------|--------------|---------------
37
- openpyxl | 43.5 | 469.1
38
- openpyxl + lxml | 21.1 | 226.3
39
- xlsxwriter | 17.2 | 186.2
40
- xlsxlite | 1.9 | 19.2
41
-
42
- ## Limitations
43
-
44
- This library is for projects which need to generate large spreadsheets, quickly, for the purposes of data exchange, and
45
- so it intentionally only supports a tiny subset of SpreadsheetML specification:
46
-
47
- * No styling or themes
48
- * Only strings, numbers, booleans and dates are supported cell types
49
-
50
- If you need to do anything fancier then take a look at [xlxswriter](https://xlsxwriter.readthedocs.io/) and
51
- [openpyxl](https://openpyxl.readthedocs.io/).
52
-
53
- ## Development
54
-
55
- To run all tests:
56
-
57
- ```
58
- py.test xlsxlite -s
59
- ```
60
-
61
- Keywords: excel xlxs
62
- Platform: UNKNOWN
63
- Classifier: Intended Audience :: Developers
64
- Classifier: License :: OSI Approved :: MIT License
65
- Classifier: Operating System :: OS Independent
66
- Classifier: Programming Language :: Python
67
- Description-Content-Type: text/markdown
@@ -1,15 +0,0 @@
1
- README.md
2
- setup.cfg
3
- setup.py
4
- xlsxlite/__init__.py
5
- xlsxlite/utils.py
6
- xlsxlite/writer.py
7
- xlsxlite.egg-info/PKG-INFO
8
- xlsxlite.egg-info/SOURCES.txt
9
- xlsxlite.egg-info/dependency_links.txt
10
- xlsxlite.egg-info/top_level.txt
11
- xlsxlite/test/__init__.py
12
- xlsxlite/test/base.py
13
- xlsxlite/test/test_perf.py
14
- xlsxlite/test/test_utils.py
15
- xlsxlite/test/test_writer.py
@@ -1 +0,0 @@
1
- xlsxlite
File without changes
File without changes
File without changes