Path Handling Demo
==================

This example demonstrates how to use the cross-platform path utilities
provided by :mod:`libp2p.utils.paths`.

After installing py-libp2p (``pip install -e .`` from a checkout, or ``pip install libp2p``), you can run the demo as a console script or as a module:

.. code-block:: console

    $ python -m pip install libp2p
    Collecting libp2p
    ...
    Successfully installed libp2p-x.x.x
    $ path-handling

From a source checkout you can also run:

.. code-block:: console

    $ python -m examples.path_handling.path_handling_demo

The full source code for the implementation is below:

.. literalinclude:: ../examples/path_handling/path_handling.py
    :language: python
    :linenos:

API reference (Sphinx)
----------------------

Submodules
~~~~~~~~~~

examples.path\_handling.path\_handling module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: examples.path_handling.path_handling
   :members:
   :show-inheritance:
   :undoc-members:

examples.path\_handling.path\_handling\_demo module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: examples.path_handling.path_handling_demo
   :members:
   :show-inheritance:
   :undoc-members:

Package contents
~~~~~~~~~~~~~~~~

.. automodule:: examples.path_handling
   :members:
   :show-inheritance:
   :undoc-members:
