{ "info": { "author": "C.W.", "author_email": "wangc_2011@hotmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries" ], "description": "================================================================================\npyexcel-xlsxr - Let you focus on data, instead of xlsx format\n================================================================================\n\n.. image:: https://raw.githubusercontent.com/pyexcel/pyexcel.github.io/master/images/patreon.png\n :target: https://www.patreon.com/pyexcel\n\n.. image:: https://api.bountysource.com/badge/team?team_id=288537\n :target: https://salt.bountysource.com/teams/chfw-pyexcel\n\n.. image:: https://travis-ci.org/pyexcel/pyexcel-xlsxr.svg?branch=master\n :target: http://travis-ci.org/pyexcel/pyexcel-xlsxr\n\n.. image:: https://codecov.io/gh/pyexcel/pyexcel-xlsxr/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/pyexcel/pyexcel-xlsxr\n\n.. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg\n :target: https://gitter.im/pyexcel/Lobby\n\n\n**pyexcel-xlsxr** is a specialized xlsx reader using lxml. It does partial reading, meaning\nit wont load all content into memory.\n\n\nlxml installation\n=================\n\nThis library depends on lxml. Because its availablity, the use of this library is restricted.\n\nfor PyPy, lxml == 3.4.4 are tested to work well. But lxml above 3.4.4 is difficult to get installed.\n\nfor Python 3.7, please use lxml==4.1.1.\n\nOtherwise, this library works OK with lxml 3.4.4 or above.\n\n\n\nKnown constraints\n==================\n\nFonts, colors and charts are not supported.\n\nInstallation\n================================================================================\n\n\nYou can install pyexcel-xlsxr via pip:\n\n.. code-block:: bash\n\n $ pip install pyexcel-xlsxr\n\n\nor clone it and install it:\n\n.. code-block:: bash\n\n $ git clone https://github.com/pyexcel/pyexcel-xlsxr.git\n $ cd pyexcel-xlsxr\n $ python setup.py install\n\nSupport the project\n================================================================================\n\nIf your company has embedded pyexcel and its components into a revenue generating\nproduct, please support me on `patreon `_\nor `bounty source `_ to maintain\nthe project and develop it further.\n\nIf you are an individual, you are welcome to support me too and for however long\nyou feel like. As my backer, you will receive\n`early access to pyexcel related contents `_.\n\nAnd your issues will get prioritized if you would like to become my patreon as `pyexcel pro user`.\n\nWith your financial support, I will be able to invest\na little bit more time in coding, documentation and writing interesting posts.\n\n\nUsage\n================================================================================\n\nAs a standalone library\n--------------------------------------------------------------------------------\n\nRead from an xlsx file\n********************************************************************************\n\nHere's the sample code:\n\n.. code-block:: python\n\n >>> from pyexcel_xlsxr import get_data\n >>> data = get_data(\"your_file.xlsx\")\n >>> import json\n >>> print(json.dumps(data))\n {\"Sheet 1\": [[1, 2, 3], [4, 5, 6]], \"Sheet 2\": [[\"row 1\", \"row 2\", \"row 3\"]]}\n\n\n\nRead from an xlsx from memory\n********************************************************************************\n\nContinue from previous example:\n\n.. code-block:: python\n\n >>> # This is just an illustration\n >>> # In reality, you might deal with xlsx file upload\n >>> # where you will read from requests.FILES['YOUR_XLSX_FILE']\n >>> data = get_data(io)\n >>> print(json.dumps(data))\n {\"Sheet 1\": [[1, 2, 3], [4, 5, 6]], \"Sheet 2\": [[7, 8, 9], [10, 11, 12]]}\n\n\nPagination feature\n********************************************************************************\n\n\n\nLet's assume the following file is a huge xlsx file:\n\n.. code-block:: python\n\n >>> huge_data = [\n ... [1, 21, 31],\n ... [2, 22, 32],\n ... [3, 23, 33],\n ... [4, 24, 34],\n ... [5, 25, 35],\n ... [6, 26, 36]\n ... ]\n >>> sheetx = {\n ... \"huge\": huge_data\n ... }\n >>> save_data(\"huge_file.xlsx\", sheetx)\n\nAnd let's pretend to read partial data:\n\n.. code-block:: python\n\n >>> partial_data = get_data(\"huge_file.xlsx\", start_row=2, row_limit=3)\n >>> print(json.dumps(partial_data))\n {\"huge\": [[3, 23, 33], [4, 24, 34], [5, 25, 35]]}\n\nAnd you could as well do the same for columns:\n\n.. code-block:: python\n\n >>> partial_data = get_data(\"huge_file.xlsx\", start_column=1, column_limit=2)\n >>> print(json.dumps(partial_data))\n {\"huge\": [[21, 31], [22, 32], [23, 33], [24, 34], [25, 35], [26, 36]]}\n\nObvious, you could do both at the same time:\n\n.. code-block:: python\n\n >>> partial_data = get_data(\"huge_file.xlsx\",\n ... start_row=2, row_limit=3,\n ... start_column=1, column_limit=2)\n >>> print(json.dumps(partial_data))\n {\"huge\": [[23, 33], [24, 34], [25, 35]]}\n\nAs a pyexcel plugin\n--------------------------------------------------------------------------------\n\nNo longer, explicit import is needed since pyexcel version 0.2.2. Instead,\nthis library is auto-loaded. So if you want to read data in xlsx format,\ninstalling it is enough.\n\n\nReading from an xlsx file\n********************************************************************************\n\nHere is the sample code:\n\n.. code-block:: python\n\n >>> import pyexcel as pe\n >>> sheet = pe.get_book(file_name=\"your_file.xlsx\")\n >>> sheet\n Sheet 1:\n +---+---+---+\n | 1 | 2 | 3 |\n +---+---+---+\n | 4 | 5 | 6 |\n +---+---+---+\n Sheet 2:\n +-------+-------+-------+\n | row 1 | row 2 | row 3 |\n +-------+-------+-------+\n\n\n\nReading from a IO instance\n********************************************************************************\n\nYou got to wrap the binary content with stream to get xlsx working:\n\n.. code-block:: python\n\n >>> # This is just an illustration\n >>> # In reality, you might deal with xlsx file upload\n >>> # where you will read from requests.FILES['YOUR_XLSX_FILE']\n >>> xlsxfile = \"another_file.xlsx\"\n >>> with open(xlsxfile, \"rb\") as f:\n ... content = f.read()\n ... r = pe.get_book(file_type=\"xlsx\", file_content=content)\n ... print(r)\n ...\n Sheet 1:\n +---+---+---+\n | 1 | 2 | 3 |\n +---+---+---+\n | 4 | 5 | 6 |\n +---+---+---+\n Sheet 2:\n +-------+-------+-------+\n | row 1 | row 2 | row 3 |\n +-------+-------+-------+\n\n\n\n\nLicense\n================================================================================\n\nNew BSD License\n\nDeveloper guide\n==================\n\nDevelopment steps for code changes\n\n#. git clone https://github.com/pyexcel/pyexcel-xlsxr.git\n#. cd pyexcel-xlsxr\n\nUpgrade your setup tools and pip. They are needed for development and testing only:\n\n#. pip install --upgrade setuptools pip\n\nThen install relevant development requirements:\n\n#. pip install -r rnd_requirements.txt # if such a file exists\n#. pip install -r requirements.txt\n#. pip install -r tests/requirements.txt\n\nOnce you have finished your changes, please provide test case(s), relevant documentation\nand update CHANGELOG.rst.\n\n.. note::\n\n As to rnd_requirements.txt, usually, it is created when a dependent\n library is not released. Once the dependecy is installed\n (will be released), the future\n version of the dependency in the requirements.txt will be valid.\n\n\nHow to test your contribution\n------------------------------\n\nAlthough `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.\n\nOn Linux/Unix systems, please launch your tests like this::\n\n $ make\n\nOn Windows systems, please issue this command::\n\n > test.bat\n\nHow to update test environment and update documentation\n---------------------------------------------------------\n\nAdditional steps are required:\n\n#. pip install moban\n#. git clone https://github.com/moremoban/setupmobans.git # generic setup\n#. git clone https://github.com/pyexcel/pyexcel-commons.git commons\n#. make your changes in `.moban.d` directory, then issue command `moban`\n\nWhat is pyexcel-commons\n---------------------------------\n\nMany information that are shared across pyexcel projects, such as: this developer guide, license info, etc. are stored in `pyexcel-commons` project.\n\nWhat is .moban.d\n---------------------------------\n\n`.moban.d` stores the specific meta data for the library.\n\nAcceptance criteria\n-------------------\n\n#. Has Test cases written\n#. Has all code lines tested\n#. Passes all Travis CI builds\n#. Has fair amount of documentation if your change is complex\n#. Please update CHANGELOG.rst\n#. Please add yourself to CONTRIBUTORS.rst\n#. Agree on NEW BSD License for your contribution\n\n\n\nChange log\n================================================================================\n\n0.5.2 - 15.09.2018\n--------------------------------------------------------------------------------\n\nUpdated\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n#. Fix python 3 compactibility\n\n0.5.1 - 14.07.2018\n--------------------------------------------------------------------------------\n\nUpdated\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n#. `#1 `_: fix xml parsing\n problem when the microsoft spreadsheetml 2009 ac name space 'x14ac' made lxml\n an idiot\n\n0.5.0 - 24.11.2017\n--------------------------------------------------------------------------------\n\nAdded\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n#. Initial release. In order align it with pyexcel 0.5.0 release, its version\n start from 0.5.0\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/pyexcel/pyexcel-xlsxr/archive/0.5.2.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pyexcel/pyexcel-xlsxr", "keywords": "python", "license": "New BSD", "maintainer": "", "maintainer_email": "", "name": "pyexcel-xlsxr", "package_url": "https://pypi.org/project/pyexcel-xlsxr/", "platform": "", "project_url": "https://pypi.org/project/pyexcel-xlsxr/", "project_urls": { "Download": "https://github.com/pyexcel/pyexcel-xlsxr/archive/0.5.2.tar.gz", "Homepage": "https://github.com/pyexcel/pyexcel-xlsxr" }, "release_url": "https://pypi.org/project/pyexcel-xlsxr/0.5.2/", "requires_dist": null, "requires_python": "", "summary": "Read xlsx file using partial xml", "version": "0.5.2" }, "last_serial": 4274771, "releases": { "0.5.0": [ { "comment_text": "", "digests": { "md5": "23df80f9d31a69e1acf53540e7386ced", "sha256": "611fe42c601cbb7a4c4ebd97432437d36facf59ac6270a17143ddf256a6c8c1e" }, "downloads": -1, "filename": "pyexcel_xlsxr-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "23df80f9d31a69e1acf53540e7386ced", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 12797, "upload_time": "2017-11-24T22:29:45", "url": "https://files.pythonhosted.org/packages/f8/08/c3e6e95492da45034cfd83a75528d3b1cac810ecdcde896c703e516a7bab/pyexcel_xlsxr-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "af59277d919e46aefc818c55a30b6898", "sha256": "bf06a7f139d52c4e6b91234862af1808399be62344bba0cd460131e96145daf1" }, "downloads": -1, "filename": "pyexcel-xlsxr-0.5.0.tar.gz", "has_sig": false, "md5_digest": "af59277d919e46aefc818c55a30b6898", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14025, "upload_time": "2017-11-24T22:29:44", "url": "https://files.pythonhosted.org/packages/38/9e/41acc7d8953eda939c2c26a09535faea324d06e7695260d4cd0c27da358a/pyexcel-xlsxr-0.5.0.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "ea790d3524585450687ecfbb0b3034d8", "sha256": "dfe91a91cceaaea26252956a0ded3adda53c96f3b89f217ce514486870d8f61a" }, "downloads": -1, "filename": "pyexcel_xlsxr-0.5.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ea790d3524585450687ecfbb0b3034d8", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 13743, "upload_time": "2018-09-15T10:52:33", "url": "https://files.pythonhosted.org/packages/cd/89/5d099919066c70e2cd2492f95d1f9994788f97607d048e08813b851ea702/pyexcel_xlsxr-0.5.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8ec4236734ee71406b72560c171c10a1", "sha256": "7813794f919e1e1753c522855a034b30c46aaa6bb3134f239597384b00ebf1dc" }, "downloads": -1, "filename": "pyexcel-xlsxr-0.5.2.tar.gz", "has_sig": false, "md5_digest": "8ec4236734ee71406b72560c171c10a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14237, "upload_time": "2018-09-15T10:52:30", "url": "https://files.pythonhosted.org/packages/eb/b4/f38c63597770f8773bc967fc2396bbd124b6843ac7b7992be25fefa5bd59/pyexcel-xlsxr-0.5.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ea790d3524585450687ecfbb0b3034d8", "sha256": "dfe91a91cceaaea26252956a0ded3adda53c96f3b89f217ce514486870d8f61a" }, "downloads": -1, "filename": "pyexcel_xlsxr-0.5.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ea790d3524585450687ecfbb0b3034d8", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 13743, "upload_time": "2018-09-15T10:52:33", "url": "https://files.pythonhosted.org/packages/cd/89/5d099919066c70e2cd2492f95d1f9994788f97607d048e08813b851ea702/pyexcel_xlsxr-0.5.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8ec4236734ee71406b72560c171c10a1", "sha256": "7813794f919e1e1753c522855a034b30c46aaa6bb3134f239597384b00ebf1dc" }, "downloads": -1, "filename": "pyexcel-xlsxr-0.5.2.tar.gz", "has_sig": false, "md5_digest": "8ec4236734ee71406b72560c171c10a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14237, "upload_time": "2018-09-15T10:52:30", "url": "https://files.pythonhosted.org/packages/eb/b4/f38c63597770f8773bc967fc2396bbd124b6843ac7b7992be25fefa5bd59/pyexcel-xlsxr-0.5.2.tar.gz" } ] }