skillfed

et-xmlfile

An implementation of lxml.xmlfile for the standard library

et-xmlfile Permissive license MIT DORMANT v2.0.0 released

Install

et-xmlfile on PyPI

pip

pip install et-xmlfile

uv

uv add et-xmlfile

poetry

poetry add et-xmlfile

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 657 days since the last release
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: et_xmlfile-2.0.0-py3-none-any.whl

Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

About et-xmlfile

from the package's own PyPI description — quoted content, verbatim

.. 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...

Read as markdown · JSON record · Source repository · Homepage · Docs

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

et_xmlfile is a low-memory library for creating large XML files incrementally, writing elements to disk and clearing memory as it goes, without requiring external dependencies.

Installation is straightforward with no runtime dependencies and a pure-Python wheel distribution. The package is dormant (657 days since last release) but carries a Production/Stable classifier and supports Python 3.8–3.13.

MIT license permits commercial and private use with minimal restrictions, requiring only preservation of copyright and license notices in distributions.

Usage

pip install et-xmlfile==2.0.0

from et_xmlfile import xmlfile

with xmlfile('output.xml') as xf:
    with xf.element('root'):
        with xf.element('child'):
            xf.write('text content')

Verdict: et_xmlfile is a stable, dependency-free XML writer suitable for memory-constrained scenarios. Its dormant maintenance status and lack of recent updates pose no immediate risk given its narrow, well-defined scope, but users should verify ongoing compatibility with their Python version and XML requirements.

Needs verification

  • Whether the 657-day dormancy reflects intentional stability or abandonment risk for future Python versions
  • Performance characteristics compared to standard library ElementTree for typical use cases
  • Real-world memory savings versus standard approaches for files of various sizes
incremental xml writinglow memory xml generationstreaming xml file creationlarge xml files memory efficientxml file writer standard librarylxml xmlfile alternative

Similar packages