et-xmlfile


Nameet-xmlfile JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://foss.heptapod.net/openpyxl/et_xmlfile
SummaryAn implementation of lxml.xmlfile for the standard library
upload_time2024-10-25 17:25:40
maintainerNone
docs_urlNone
authorSee AUTHORS.txt
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: https://foss.heptapod.net/openpyxl/et_xmlfile/badges/branch/default/coverage.svg
    :target: https://coveralls.io/bitbucket/openpyxl/et_xmlfile?branch=default
    :alt: coverage status

et_xmfile
=========

XML can use lots of memory, and et_xmlfile is a low memory library for creating large XML files
And, although the standard library already includes an incremental parser, `iterparse` it has no equivalent when writing XML. Once an element has been added to the tree, it is written to
the file or stream and the memory is then cleared.

This module is based upon the `xmlfile module from lxml <http://lxml.de/api.html#incremental-xml-generation>`_ with the aim of allowing code to be developed that will work with both libraries.
It was developed initially for the openpyxl project, but is now a standalone module.

The code was written by Elias Rabel as part of the `Python Düsseldorf <http://pyddf.de>`_ openpyxl sprint in September 2014.

Proper support for incremental writing was provided by Daniel Hillier in 2024

Note on performance
-------------------

The code was not developed with performance in mind, but turned out to be faster than the existing SAX-based implementation but is generally slower than lxml's xmlfile.
There is one area where an optimisation for lxml may negatively affect the performance of et_xmfile and that is when using the `.element()` method on the xmlfile context manager. It is, therefore, recommended simply to create Elements write these directly, as in the sample code.

            

Raw data

            {
    "_id": null,
    "home_page": "https://foss.heptapod.net/openpyxl/et_xmlfile",
    "name": "et-xmlfile",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "See AUTHORS.txt",
    "author_email": "charlie.clark@clark-consulting.eu",
    "download_url": "https://files.pythonhosted.org/packages/d3/38/af70d7ab1ae9d4da450eeec1fa3918940a5fafb9055e934af8d6eb0c2313/et_xmlfile-2.0.0.tar.gz",
    "platform": null,
    "description": ".. image:: https://foss.heptapod.net/openpyxl/et_xmlfile/badges/branch/default/coverage.svg\n    :target: https://coveralls.io/bitbucket/openpyxl/et_xmlfile?branch=default\n    :alt: coverage status\n\net_xmfile\n=========\n\nXML can use lots of memory, and et_xmlfile is a low memory library for creating large XML files\nAnd, although the standard library already includes an incremental parser, `iterparse` it has no equivalent when writing XML. Once an element has been added to the tree, it is written to\nthe file or stream and the memory is then cleared.\n\nThis module is based upon the `xmlfile module from lxml <http://lxml.de/api.html#incremental-xml-generation>`_ with the aim of allowing code to be developed that will work with both libraries.\nIt was developed initially for the openpyxl project, but is now a standalone module.\n\nThe code was written by Elias Rabel as part of the `Python D\u00fcsseldorf <http://pyddf.de>`_ openpyxl sprint in September 2014.\n\nProper support for incremental writing was provided by Daniel Hillier in 2024\n\nNote on performance\n-------------------\n\nThe code was not developed with performance in mind, but turned out to be faster than the existing SAX-based implementation but is generally slower than lxml's xmlfile.\nThere is one area where an optimisation for lxml may negatively affect the performance of et_xmfile and that is when using the `.element()` method on the xmlfile context manager. It is, therefore, recommended simply to create Elements write these directly, as in the sample code.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An implementation of lxml.xmlfile for the standard library",
    "version": "2.0.0",
    "project_urls": {
        "Documentation": "https://openpyxl.pages.heptapod.net/et_xmlfile/",
        "Homepage": "https://foss.heptapod.net/openpyxl/et_xmlfile",
        "Source": "https://foss.heptapod.net/openpyxl/et_xmlfile",
        "Tracker": "https://foss.heptapod.net/openpyxl/et_xmfile/-/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c18b5fe2cc11fee489817272089c4203e679c63b570a5aaeb18d852ae3cbba6a",
                "md5": "2a0e42a250b2d8a56497969eb14a979d",
                "sha256": "7a91720bc756843502c3b7504c77b8fe44217c85c537d85037f0f536151b2caa"
            },
            "downloads": -1,
            "filename": "et_xmlfile-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2a0e42a250b2d8a56497969eb14a979d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 18059,
            "upload_time": "2024-10-25T17:25:39",
            "upload_time_iso_8601": "2024-10-25T17:25:39.051783Z",
            "url": "https://files.pythonhosted.org/packages/c1/8b/5fe2cc11fee489817272089c4203e679c63b570a5aaeb18d852ae3cbba6a/et_xmlfile-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d338af70d7ab1ae9d4da450eeec1fa3918940a5fafb9055e934af8d6eb0c2313",
                "md5": "d7db773c110c5534e61f288fdfcad807",
                "sha256": "dab3f4764309081ce75662649be815c4c9081e88f0837825f90fd28317d4da54"
            },
            "downloads": -1,
            "filename": "et_xmlfile-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d7db773c110c5534e61f288fdfcad807",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 17234,
            "upload_time": "2024-10-25T17:25:40",
            "upload_time_iso_8601": "2024-10-25T17:25:40.039150Z",
            "url": "https://files.pythonhosted.org/packages/d3/38/af70d7ab1ae9d4da450eeec1fa3918940a5fafb9055e934af8d6eb0c2313/et_xmlfile-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-25 17:25:40",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "et-xmlfile"
}
        
Elapsed time: 2.50450s