The aiocoap package is an implementation of CoAP, the
Constrained Application Protocol_.
It is written in Python 3 using its
native asyncio_ methods to facilitate
concurrent operations while maintaining an easy to use interface.
aiocoap is originally based on txThings_. If you want to use CoAP in your existing Twisted application, or can not migrate to Python 3 yet, that is probably more useful to you than aiocoap.
For how to use the aiocoap library, have a look at the guidedtour, or at the examples and tools_ provided.
A full reference is available in the
All examples can be run directly from a source code copy. If you prefer to install it, the usual Python mechanisms apply (see installation_).
API documentation: http://aiocoap.readthedocs.io/en/latest/api.html
This library supports the following standards in full or partially:
If something described by one of the standards but not implemented, it is
considered a bug; please file at the
github issue tracker_. (If it's not on
the list or in the excluded items, file a wishlist item at the same location).
.. _RFC7252: https://tools.ietf.org/html/rfc7252 .. _RFC7641: https://tools.ietf.org/html/rfc7641 .. _RFC7959: https://tools.ietf.org/html/rfc7959 .. _RFC7967: https://tools.ietf.org/html/rfc7967 .. _RFC8132: https://tools.ietf.org/html/rfc8132 .. _RFC8323: https://tools.ietf.org/html/rfc8323 .. _RFC8613: https://tools.ietf.org/html/rfc8613 .. _draft-ietf-core-resource-directory: https://tools.ietf.org/html/draft-ietf-core-resource-directory-27 .. _draft-ietf-core-oscore-groupcomm-11: https://tools.ietf.org/html/draft-ietf-core-oscore-groupcomm-11
Basic aiocoap works out of the box on Python 3.7 or newer (also works on PyPy3). For full support (DTLS, OSCORE and link-format handling) follow the installation_ instructions as these require additional libraries.
aiocoap provides different network backends for different platforms. The most featureful backend is available for Linux, but most operations work on BSDs, Windows and macOS as well. See the FAQ_ for more details.
If your library depends on aiocoap, it should pick the required extras (as per
installation_) and declare a dependency like
aiocoap[linkheader,oscore] >= 0.4b2.
aiocoap tries to stay close to PEP8_ recommendations and general best practice, and should thus be easy to contribute to.
Bugs (ranging from "design goal" and "wishlist" to typos) are currently tracked
github issue tracker_. Pull requests are welcome there; if you start
working on larger changes, please coordinate on the issue tracker.
Documentation is built using sphinx_ with
./setup.py build_sphinx; hacks
used there are described in
Unit tests are implemented in the
./tests/ directory and easiest run using
tox (though still available through
./setup.py test for the time being);
complete test coverage is aimed for, but not yet complete (and might never be,
as the error handling for pathological network partners is hard to trigger with
a library designed not to misbehave). The tests are regularly run at the
CI suite at gitlab, from where
coverage reports_ are available.
.. PEP8: http://legacy.python.org/dev/peps/pep-0008/
.. _sphinx: http://sphinx-doc.org/
github issue tracker: https://github.com/chrysn/aiocoap/issues
CI suite at gitlab: https://gitlab.com/aiocoap/aiocoap/commits/master
coverage reports: https://aiocoap.gitlab.io/aiocoap/
.. _tox: https://tox.readthedocs.io/
This is where the latest source code can be found, and bugs can be reported. Generally, this serves as the project web site.
Online documentation built from the sources.
Further general information on CoAP, the standard documents involved, and other implementations and tools available.
aiocoap is published under the MIT License, see LICENSE_ for details.
When using aiocoap for a publication, please cite it according to the output of
./setup.py cite [--bibtex].
.. guidedtour: http://aiocoap.readthedocs.io/en/latest/guidedtour.html
.. _examples: http://aiocoap.readthedocs.io/en/latest/examples.html
.. _tools: http://aiocoap.readthedocs.io/en/latest/tools.html
.. _installation: http://aiocoap.readthedocs.io/en/latest/installation.html
aiocoap module: http://aiocoap.readthedocs.io/en/latest/module/aiocoap.html
.. _LICENSE: LICENSE