Skip to content

Commit

Permalink
updated API reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Harbeck committed Jan 31, 2025
1 parent 10d1447 commit 0356c65
Showing 1 changed file with 40 additions and 8 deletions.
48 changes: 40 additions & 8 deletions py-polars/docs/source/reference/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,45 @@ Plugins
=======
.. currentmodule:: polars

Plugins allow for extending Polars' functionality. See the
`user guide <https://docs.pola.rs/user-guide/plugins/>`_ for more information
and resources.
Polars allows you to extend its functionality with either Expression plugins or IO plugins.
See the `user guide <https://docs.pola.rs/user-guide/plugins/>`_ for more information and resources.

Available plugin utility functions are:
Expression plugins
------------------

.. automodule:: polars.plugins
:members:
:autosummary:
:autosummary-no-titles:
Expression plugins are the preferred way to create user defined functions. They allow you to compile
a Rust function and register that as an expression into the Polars library. The Polars engine will
dynamically link your function at runtime and your expression will run almost as fast as native
expressions. Note that this works without any interference of Python and thus no GIL contention.

See the `expression plugins section of the user guide <https://docs.pola.rs/user-guide/plugins/expr_plugins/>`_
for more information.

.. autosummary::
:toctree: api/

plugins.register_plugin_function


IO plugins
------------------

IO plugins allow you to register different file formats as sources to the Polars engines.

See the `IO plugins section of the user guide <https://docs.pola.rs/user-guide/plugins/io_plugins/>`_
for more information.

.. note::

The ``io.plugins`` module is not imported by default in order to optimise import speed of
the primary ``polars`` module. Either import ``polars.io.plugins`` and *then* use that
namespace, or import ``register_io_source`` from the full module path, e.g.:

.. code-block:: python
from polars.io.plugins import register_io_source
.. autosummary::
:toctree: api/

io.plugins.register_io_source

0 comments on commit 0356c65

Please sign in to comment.