Items

Items are just commonly reusable Axiom items. They can represent objects such as credentials, endpoints...

API

Things that can be persisted as Axiom items share a common API. The item has an instantiate method taking no arguments, giving you a new, independent instance of the object represented by that item.

>>> storedEndpoint = endpoints.ServerEndpoint(description="tcp:0")
>>> storedEndpoint.instantiate()
<twisted.internet.endpoints.TCP4ServerEndpoint object at ...>

Alternatively, many items will allow you to use them directly as if they implemented the interface of the object you’d usually have; for example, that same ServerEndpoint implements the listen method:

>>> someFactory = protocol.ServerFactory()
>>> d = storedEndpoint.listen(someFactory)
Read the Docs v: latest
Versions
latest
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.