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 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 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.
Metadata
Release files for et-xmlfile 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| et_xmlfile-2.0.0.tar.gz | 17.2 kB | Without provenance | Details for et_xmlfile-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| et_xmlfile-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for et_xmlfile-2.0.0-py3-none-any.whl |
Total release size: 35.3 kB
Release files / et_xmlfile-2.0.0.tar.gz
| Download URL | et_xmlfile-2.0.0.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dab3f4764309081ce75662649be815c4c9081e88f0837825f90fd28317d4da54
|
|
BLAKE2b-256 checksum How to use checksums |
d338af70d7ab1ae9d4da450eeec1fa3918940a5fafb9055e934af8d6eb0c2313
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.15
|
Release files / et_xmlfile-2.0.0-py3-none-any.whl
| Download URL | et_xmlfile-2.0.0-py3-none-any.whl |
|---|---|
| Size | 18.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a91720bc756843502c3b7504c77b8fe44217c85c537d85037f0f536151b2caa
|
|
BLAKE2b-256 checksum How to use checksums |
c18b5fe2cc11fee489817272089c4203e679c63b570a5aaeb18d852ae3cbba6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.15
|
Security for et-xmlfile 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.