The aiocoap package is a Python implementation of CoAP, the Constrained Application Protocol (RFC 7252, more info at http://coap.technology/).
It uses the Python 3's asynchronous I/O to facilitate concurrent operations while maintaining a simple to use interface and not depending on anything outside the standard library.
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. All the details are in the aiocoap module documentation.
All examples can be run directly from a source code copy. If you prefer to install it, the usual Python mechanisms apply (see installation).
This library supports the following standards in full or partially:
- RFC7252 (CoAP): missing are a caching and cross proxy implementation, proper multicast (support is incomplete), and DTLS.
- RFC7641 (Observe): Reordering, re-registration, and active cancellation are missing.
- RFC7959 (Blockwise): Multicast exceptions missing.
- draft-ietf-core-etch-04: Only registry entries added, but that should be all that's neede on the library side.
- draft-ietf-core-resource-directory-09: A standalone resource directory server is provided. It lacks support for groups, PATCHes to endpoint locations, DNS-SD mapping and security considerations, and is generally rather experimental.
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).
Basic aiocoap works out of the box on Python 3.4 or greater, and on 3.3 with additional dependencies.
The examples require Python 3.5 as they use newer syntax.
Some components (eg. servers that should auto-generate .well-known/core
resources, OSCOAP) require additional packages to be present (eg. the
link_header module or Python 3.6's backported secrets module); those are
reflected in "extras" dependencies, see setup.py
for details. Python
modules that require all features should declare a dependency on
aiocoap[all]
.
aiocoap tries to stay close to PEP8 recommendations and general best practice,
and should thus be easy to contribute to. Unit tests are implemented in the
./tests/
directory and easiest run using ./setup.py test
; 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).
Documentation is built using sphinx with ./setup.py build_sphinx
; hacks
used there are described in ./doc/README.doc
.
Bugs (ranging from "design goal" and "wishlist" to typos) are currently tracked in the github issue tracker.
https://github.com/chrysn/aiocoap
This 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.
-
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]
.
- Copyright (c) 2012-2014 Maciej Wasilak <http://sixpinetrees.blogspot.com/>,
- 2013-2014 Christian Amsüss <[email protected]>