Metadata-Version: 2.4
Name: pyorc
Version: 0.12.0
Summary: Python module for reading and writing Apache ORC file format.
Author-email: noirello <noirello@gmail.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/noirello/pyorc
Project-URL: Repository, https://github.com/noirello/pyorc.git
Project-URL: Documentation, https://pyorc.readthedocs.io
Project-URL: Changelog, https://github.com/noirello/pyorc/blob/master/CHANGELOG.rst
Keywords: python3,orc,apache-orc
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Requires-Python: <4.0,>=3.11
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: tzdata>=2020.5; sys_platform == "win32"
Dynamic: license-file

PyORC
=====

.. image:: https://github.com/noirello/pyorc/actions/workflows/ci.yml/badge.svg?branch=master
    :target: https://github.com/noirello/pyorc/actions/workflows/ci.yml
    :alt: GitHub Actions CI Status

.. image:: https://codecov.io/gh/noirello/pyorc/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/noirello/pyorc
    :alt: Codecov code coverage

.. image:: https://readthedocs.org/projects/pyorc/badge/?version=latest
    :target: https://pyorc.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

Python module for reading and writing `Apache ORC`_ file format. It uses the Apache ORC's Core C++ API
under the hood, and provides a similar interface as the `csv module`_ in the Python standard library.

Supports Python 3.11 or newer and ORC 1.8 or newer library version.

Features
--------

- Reading ORC files.
- Writing ORC files.
- While using Python's stream/file-like object IO interface.

That sums up quite well the purpose of this project.

Example
-------

Minimal example for reading an ORC file:

.. code:: python

        import pyorc

        with open("./data.orc", "rb") as data:
            reader = pyorc.Reader(data)
            for row in reader:
                print(row)

And another for writing one:

.. code:: python

        import pyorc

        with open("./new_data.orc", "wb") as data:
            with pyorc.Writer(data, "struct<col0:int,col1:string>") as writer:
                writer.write((1, "ORC from Python"))

Contribution
============

Any contributions are welcome. If you would like to help in development, fork the
repository, or report an issue here on GitHub. You can also help in improving the
documentation.

.. _Apache ORC: https://orc.apache.org/
.. _csv module: https://docs.python.org/3/library/csv.html
