Skip to content

Commit

Permalink
Minor documentation modernizations
Browse files Browse the repository at this point in the history
This fixes various little outdatednesses throughout the installation,
examples and guided tour.
  • Loading branch information
chrysn committed Apr 2, 2023
2 parents 4cd44f1 + fa41512 commit d482a33
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
6 changes: 3 additions & 3 deletions doc/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ Client
.. literalinclude:: ../clientGET.py
:language: python
:linenos:
:lines: 15-
:lines: 11-

.. literalinclude:: ../clientPUT.py
:language: python
:linenos:
:lines: 15-
:lines: 11-

Server
------

.. literalinclude:: ../server.py
:language: python
:linenos:
:lines: 15-
:lines: 11-
5 changes: 2 additions & 3 deletions doc/guidedtour.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,12 @@ It tells that there is a resource at the path ``/time`` that has the ``obs``\
ervable attribute, a resource at the path ``/.well-known/core``, and more at
``/other/...`` and ``/whoami``.

.. note:: Getting "5.00 Internal Server Error" instead, all lines in a single
.. note:: Getting all lines in a single
row or no color? Then there are third party modules missing. Run ``python3
-m aiocoap.cli.defaults`` to see which they are, or just go back to the
:ref:`installation step<installation-development>` and make sure to include
the "``[all]``" part.

.. _`link_header module`: https://pypi.python.org/pypi/LinkHeader

.. note:: There can be a "(No newline at end of message)" line below your
output. This just makes sure your prompt does not start in the middle of
the screen. I'll just ignore that.
Expand Down Expand Up @@ -148,6 +146,7 @@ session, as support for the asynchronous shell is always available there.

::

>>> from aiocoap import *
>>> protocol = await Context.create_client_context()
>>> msg = Message(code=GET, uri="coap://localhost/other/separate")
>>> response = await protocol.request(msg).response
Expand Down
16 changes: 4 additions & 12 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ aiocoap. This is done using a simple::

(In some cases, the program is called ``pip`` only).

If ``pip3`` is not available on your platform, you can manually download and
unpack the latest ``.tar.gz`` file from the `Python package index`_ and run

::

$ ./setup.py install


.. _installation-development:

Expand Down Expand Up @@ -86,11 +79,6 @@ installation.

The extras currently supported are:

* ``linkheader``: Needed for generating and parsing files in RFC6690_ link
format, eg. ``.well-known/core`` files. Running or interacting with a
Resource Directory is impossible without this module, as are many other
discovery steps that applications will want to do.

* ``oscore``: Required for the :mod:`aiocoap.transports.oscore` transport.

* ``tinydtls``: Required for using CoAP over DTLS.
Expand All @@ -103,6 +91,10 @@ The extras currently supported are:
* ``docs``: Installs tools needed to build the documentation (not part of
``all``).

* ``linkheader``: Originally needed for generating and parsing files in
RFC6690_ link format, eg. ``.well-known/core`` files. This extra does not
contain any external dependencies, but was left in place for compatibility.

Which libraries and versions are pulled in by this exactly is documented in the
``setup.py`` file.

Expand Down

0 comments on commit d482a33

Please sign in to comment.