Metadata-Version: 2.4
Name: http-stream-xml
Version: 1.3.14
Summary: Parse XML in HTTP response on the fly, by chunks - for example NCBI (PubMed) Entrez.
Project-URL: Homepage, https://github.com/andgineer/http-stream-xml
Project-URL: documentation, https://http-stream-xml.sorokin.engineer/
Author-email: Andrey Sorokin <andrey@sorokin.engineer>
License: Copyright (c) 2026 Andrey Sorokin (andrey@sorokin.engineer)
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE.txt
Keywords: chunked,http,stream,xml
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.12
Requires-Dist: requests
Description-Content-Type: text/x-rst

http-stream-xml
===============

|made_with_python| |build_status| |coverage| |pypi_version| |pypi_license| |readthedocs|

Parse XML from HTTP responses on the fly, chunk by chunk.

This works with `HTTP protocol chunks <https://en.wikipedia.org/wiki/Chunked_transfer_encoding>`_
or partial downloads of large HTTP responses.

I use it to work with the `NCBI (PubMed) Entrez API <https://www.ncbi.nlm.nih.gov/>`_.

See usage examples in these blog articles:

- `XML streaming chunks load <https://sorokin.engineer/posts/en/xml_streaming_chunks_load.html>`_
- `Entrez gene streaming with http-stream-xml <https://sorokin.engineer/posts/en/entrez_gene_streaming_with_http_stream_xml.html>`_

Documentation
-------------
`Documentation <https://http-stream-xml.sorokin.engineer/>`_

Scripts
-------
Install `invoke <https://docs.pyinvoke.org/en/stable/>`_ preferably with pipx:

.. code-block:: bash

    pipx install invoke

To get available scripts:

.. code-block:: bash

    inv --list

Coverage report
---------------
* `Codecov <https://app.codecov.io/gh/andgineer/http-stream-xml/tree/master/src/http_stream_xml>`_
* `Coveralls <https://coveralls.io/github/andgineer/http-stream-xml>`_

.. |build_status| image:: https://github.com/andgineer/http-stream-xml//workflows/ci/badge.svg
    :target: https://github.com/andgineer/http-stream-xml/actions
    :alt: Latest release

.. |pypi_version| image:: https://img.shields.io/pypi/v/http-stream-xml.svg?style=flat-square
    :target: https://pypi.org/p/http-stream-xml
    :alt: Latest release

.. |pypi_license| image:: https://img.shields.io/pypi/l/http-stream-xml.svg?style=flat-square
    :target: https://pypi.python.org/pypi/http-stream-xml
    :alt: MIT license

.. |readthedocs| image:: https://readthedocs.org/projects/http-stream-xml/badge/?version=latest
    :target: https://http-stream-xml.sorokin.engineer/
    :alt: Documentation Status

.. |made_with_python| image:: https://img.shields.io/badge/Made%20with-Python-1f425f.svg
    :target: https://www.python.org/
    :alt: Made with Python

.. |codecov| image:: https://codecov.io/gh/andgineer/http-stream-xml/branch/master/graph/badge.svg
    :target: https://app.codecov.io/gh/andgineer/http-stream-xml/tree/master/src%2Fhttp_stream_xml
    :alt: Code coverage

.. |coverage| image:: https://raw.githubusercontent.com/andgineer/http-stream-xml/python-coverage-comment-action-data/badge.svg
    :target: https://htmlpreview.github.io/?https://github.com/andgineer/http-stream-xml/blob/python-coverage-comment-action-data/htmlcov/index.html
    :alt: Coverage report
