runway.cfngin.hooks.docker.hook_data module

Docker hook_data object.

class runway.cfngin.hooks.docker.hook_data.DockerHookData(**kwargs: typing.Any)[source]

Bases: MutableMapping[str, Any]

Docker hook_data object.

Initialize class.

Provided kwargs are added to the object as attributes.


property client

Docker client.


Implement evaluation of instances as a bool.

__contains__(value: typing.Any)bool

Implement evaluation of ‘in’ conditional.

__delitem__(key: str)None

Implement deletion of self[key].


key – Attribute name to remove from the object.


__getitem__(key: str)typing.Any

Implement evaluation of self[key].


key – Attribute name to return the value for.


The value associated with the provided key/attribute name.


AttributeError – If attribute does not exist on this object.



Return iterator object that can iterate over all attributes.



Implement the built-in function len().


__setitem__(key: str, value: typing.Any)None

Implement assignment to self[key].

  • key – Attribute name to associate with a value.

  • value – Value of a key/attribute.



Return string representation of the object.

clear()None.  Remove all items from D.

Clear _found_cache.

property data

Sanitized output of __dict__.

Removes anything that starts with _.

find(query: str, default: Optional[typing.Any] = None, ignore_cache: bool = False)typing.Any

Find a value in the map.

Previously found queries are cached to increase search speed. The cached value should only be used if values are not expected to change.

  • query – A period delimited string that is split to search for nested values

  • default – The value to return if the query was unsuccessful.

  • ignore_cache – Ignore cached value.

get(key: str, default: Optional[typing.Any] = None)typing.Any

Implement evaluation of self.get.

  • key – Attribute name to return the value for.

  • default – Value to return if attribute is not found.

items()a set-like object providing a view on D’s items
keys()a set-like object providing a view on D’s keys
pop(k[, d])v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem()(k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d])D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F)None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

update_context(context: CfnginContext = None)runway.cfngin.hooks.docker.hook_data.DockerHookData[source]
update_context(context: None = None)None

Update context object with new the current DockerHookData.

values()an object providing a view on D’s values
classmethod from_cfngin_context(context: CfnginContext)DockerHookData[source]

Get existing object or create a new one.