.. _prototype: :mod:`sightline.simon.prototype` --- Prototype API ================================================== .. module:: sightline.simon.prototype :synopsis: Prototype API .. class:: Prototype Attributes ---------- - .. attribute:: Prototype.id :type: str - .. attribute:: Prototype.type :type: str - .. attribute:: Prototype.name :type: str - .. attribute:: Prototype.description :type: str - .. attribute:: Prototype.tags :type: List[str] - .. attribute:: Prototype.created :type: datetime - .. attribute:: Prototype.capabilities :type: List[Capability] - .. attribute:: Prototype.dependencies :type: List[Prototype] Class Methods ------------- - .. method:: Prototype.list() Returns all Prototypes of any type. If you're only concerned with a Prototype of specific types, you can use the ``Servable.prototypes()`` classmethod instead to return Prototypes of only that Servable type. :classmethod: :rtype: List[Prototype] - .. method:: Prototype.from_id(id) A constructor for Prototypes. In place of ``id`` you can also pass in ``name:tag`` from the Docker image for this Prototype. This allows lookup of Prototype id from the Docker image. :classmethod: :param id: :type id: str :rtype: Prototype :raises TypeError: if not called with an appropriate Servable class - .. method:: Prototype.remove(*id) Removes the Prototypes corresponding to the passed in ``id``. ``name:tag`` can be used in place of ``id``. Will only remove Prototypes that have no other Prototypes dependent on them, and will not remove any Prototypes if any of the passed in Prototypes cannot be removed. :classmethod: :param id: A Prototype id :type id: str :rtype: None