Package: aiocoap
The aiocoap package is an implementation of CoAP, theConstrained Application
Protocol.It is written in Python 3 using itsnative asynciomethods to facilitate
concurrent operations while maintaining an easy to use interface.UsageFor how to use the aiocoap library, have a look at theguidedtour, or at
theexamplesandtoolsprovided.A full reference is available in theAPI documentation.All examples can be run directly from a source code copy. If you prefer to
install it, the usual Python mechanisms apply (seeinstallation).Features / StandardsThis library supports the following standards in full or partially:RFC7252(CoAP): Supported for clients and servers. Multicast is supported on
the server side, and partially for clients. DTLS is supported but experimental,
and lacking some security properties. No caching is done inside the library.RFC7641(Observe): Basic support for clients and servers. Reordering,
re-registration, and active cancellation are missing.RFC7959(Blockwise): Supported both for atomic and random access.RFC8323(TCP, WebSockets): Supports CoAP over TCP, TLS, and WebSockets (both
over HTTP and HTTPS). The TLS parts are server-certificate only;
preshared, raw public keys and client certificates are not supported yet.RFC7967(No-Response): Supported.RFC8132(PATCH/FETCH): Types and codes known, FETCH observation supported.RFC9176: A standalone resource directory
server is provided along with a library function to register at one. They
lack support for groups and security considerations, and are generally rather
simplistic.RFC8613(OSCORE): Full support client-side; protected servers can be
implemented based on it but are not automatic yet.draft-ietf-core-oscore-groupcomm-17(Group OSCORE): Supported for both group
and pairwise mode in groups that are fully known. (The lack of an implemented
joining or persistence mechanism makes this impractical for anything but
experimentation.)If something described by one of the standards but not implemented, it is
considered a bug; please file at thegithub issue tracker. (If it’s not on
the list or in the excluded items, file a wishlist item at the same location).DependenciesBasic aiocoap works out of the box onPython3.7 or newer (also works onPyPy3). For full support (DTLS, OSCORE and link-format handling) follow theinstallationinstructions 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 theFAQfor more details.If your library depends on aiocoap, it should pick the required extras (as perinstallation) and declare a dependency likeaiocoap[linkheader,oscore] >= 0.4b2.Developmentaiocoap tries to stay close toPEP8recommendations and general best practice,
and should thus be easy to contribute to.Bugs (ranging from “design goal” and “wishlist” to typos) are currently tracked
in thegithub issue tracker. Pull requests are welcome there; if you start
working on larger changes, please coordinate on the issue tracker.Documentation is built usingsphinxwith./setup.py build_sphinx; hacks
used there are described in./doc/README.doc.Unit tests are implemented in the./tests/directory and easiest run usingtox(though still available through./setup.py testfor 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 theCI
suite at gitlab, from wherecoverage reportsare available.Relevant URLshttps://github.com/chrysn/aiocoapThis is where the latest source code can be found, and bugs can be reported.
Generally, this serves as the project web site.http://aiocoap.readthedocs.org/Online documentation built from the sources.http://coap.technology/Further general information on CoAP, the standard documents involved, and
other implementations and tools available.Licensingaiocoap is published under the MIT License, and follows the best practice ofreuse.software.
Files inaiocoap/util/vendored/may have different (but compatible and OSI approved) licenses.When using aiocoap for a publication, please cite it according to the output of./setup.py cite[--bibtex].Copyright Christian Amsüss and the aiocoap contributors.aiocoap was originally based ontxThingsby Maciej Wasilak.
The full list of aiocoap contributors can be obtained from the version control history.