here.platform.model.publication module#
This module defines the model and functions related to a publication.
- class here.platform.model.publication.Publication(catalog, layers: List[Layer], dependencies: List[VersionDependency] | None = None, publication_info: Tuple[str, int | None] | None = None)[source]#
Bases:
objectA publication is needed to write to a catalog.
Create a publication via the
Catalog.init_publicationfunction, specifying to which layers you want to write to. The request is validated and aPublicationis returned when it can be satisfied.Use the publication in the set_* and write_* method of
Layerclasses, for layers that need a publication to operate.When writing is complete, close the publication by either calling the
completefunction, orcancel. Note however that not all the layer types support cancelling and rolling back a publication.- cancel(strict: bool = False)[source]#
Cancel the publication, usually as a result of errors.
After calling this function, the object can’t be used anymore. Pending transactions are rolled back, but data written to APIs that are not transaction-based stay written. :param strict: True to require that the publication exists, False to allow it to have
already been cancelled.