From bcc7d256a6a87bf52c4126479e7c85bc98f62c18 Mon Sep 17 00:00:00 2001 From: mystical-prog Date: Sat, 19 Oct 2024 14:51:43 +0530 Subject: [PATCH] added ping docs --- docs/examples.ping.rst | 18 ++++++++++++++++++ docs/examples.rst | 1 + 2 files changed, 19 insertions(+) create mode 100644 docs/examples.ping.rst diff --git a/docs/examples.ping.rst b/docs/examples.ping.rst new file mode 100644 index 00000000..a5af648f --- /dev/null +++ b/docs/examples.ping.rst @@ -0,0 +1,18 @@ +Ping Demo +========= + +Copy the code below into a file called ``ping.py``. +Install dependencies, preferably in a virtual environment, with: + +.. code-block:: bash + + python -m pip install libp2p + +Run the demo with ``python ping.py`` and copy the output. + +Open a second terminal, navigate to the folder that contains ``ping.py``, then paste +and run the copied line. + +.. literalinclude:: ../examples/echo/echo.py + :language: python + :linenos: diff --git a/docs/examples.rst b/docs/examples.rst index 04b4917a..91909d05 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -12,6 +12,7 @@ Example Scripts examples.chat examples.echo + examples.ping Module contents ---------------