aiocoap.options module

class aiocoap.options.Options

Bases: object

Represent CoAP Header Options.

decode(rawdata)

Passed a CoAP message body after the token as rawdata, fill self with the options starting at the beginning of rawdata, an return the rest of the message (the body).

encode()

Encode all options in option header into string of bytes.

add_option(option)

Add option into option header.

delete_option(number)

Delete option from option header.

get_option(number)

Get option with specified number.

option_list()
property uri_path

Iterable view on the URI_PATH option.

property uri_query

Iterable view on the URI_QUERY option.

property location_path

Iterable view on the LOCATION_PATH option.

property location_query

Iterable view on the LOCATION_QUERY option.

property block2

Single-value view on the BLOCK2 option.

property block1

Single-value view on the BLOCK1 option.

property content_format

Single-value view on the CONTENT_FORMAT option.

property etag

Single ETag as used in responses

property etags

List of ETags as used in requests

property if_none_match

Presence of the IF_NONE_MATCH option.

property observe

Single-value view on the OBSERVE option.

property accept

Single-value view on the ACCEPT option.

property uri_host

Single-value view on the URI_HOST option.

property uri_port

Single-value view on the URI_PORT option.

property proxy_uri

Single-value view on the PROXY_URI option.

property proxy_scheme

Single-value view on the PROXY_SCHEME option.

property size1

Single-value view on the SIZE1 option.

property object_security

Single-value view on the OBJECT_SECURITY option.

property max_age

Single-value view on the MAX_AGE option.

property if_match

Iterable view on the IF_MATCH option.

property no_response

Single-value view on the NO_RESPONSE option.

property echo

Single-value view on the ECHO option.

property request_tag

Iterable view on the REQUEST_TAG option.

property hop_limit

Single-value view on the HOP_LIMIT option.

property request_hash

Experimental property for draft-amsuess-core-cachable-oscore

property edhoc

Presence of the EDHOC option.

property size2

Single-value view on the SIZE2 option.