Metadata-Version: 2.1
Name: streamxml2json
Version: 1.0.0.1
Summary: Simple library to stream a huge XML file to a JSON file
Home-page: https://github.com/rafaeelaudibert/streamxml2json
Author: RafaAudibert
Author-email: rafaeelaudibert@gmail.com
License: MIT
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
License-File: LICENSE

['# streamxml2json\n', '\n', 'Simple library to stream a huge XML file to a JSON file\n', '\n', '## Instalation\n', '\n', 'You can install it from PyPi:\n', '\n', '```bash\n', '$ pip install streamxml2json\n', '```\n', '\n', '## Usage\n', '\n', '```python\n', 'import stream_xml2json from streamxml2json\n', '\n', 'with open("input.xml", "rb") as input_file:\n', '   stream_xml2json(input_file, "output.json", 2)\n', '```\n', '\n', '`xml_input` can either be an XML `string` or a file-like object opened in binary mode - using `open(file, "rb")` for example. If your xml is gzipped, for example, you might pass a `GzipFile(filename)` instance\n', '\n', '`json_output_filename` must be a `string` with the relative/absolute path to where the json should be written to.\n', '\n', '`item_depth` is required because of the streaming nature of the process. You must tell at which depth of the XML we want to iterate on to generate the output JSON array.\n', '\n', 'By default, we pretty-print the JSON file with `2` spaces. You can disable this pretty-printing by setting `pretty` to False, or customize the indentation depth by changing `indent` value.\n', '\n', 'We automatically display a progress bar. You can disable it by passing False to `display_progress_bar`. We use [`tqdm`](https://github.com/tqdm/tqdm) to display this progress bar. You can pass additional customization parameters as a dictionary to `tqdm_kwargs`. One interesting option is `total`, which will make tqdm be able to show how much longer it expects the process to take. Please check their documentation to better understand the available options.\n']

