class CuraAPI: # For now we use the same API version to be consistent. VERSION = PluginRegistry.APIVersion # Backups API. backups = Backups()
def __init__(self, application: Optional["CuraApplication"] = None) -> None: super().__init__(parent = CuraAPI._application) # Accounts API self._account = Account(self._application) # Backups API self._backups = Backups(self._application) # Interface API self._interface = Interface(self._application)
def __init__(self, application: Optional["CuraApplication"] = None) -> None: super().__init__(parent=CuraAPI._application) self._account = Account(self._application) self._backups = Backups(self._application) self._connectionStatus = ConnectionStatus() # Interface API self._interface = Interface(self._application)
class CuraAPI: """ The official Cura API that plugins can use to interact with Cura. Python does not technically prevent talking to other classes as well, but this API provides a version-safe interface with proper deprecation warnings etc. Usage of any other methods than the ones provided in this API can cause plugins to be unstable. """ # For now we use the same API version to be consistent. VERSION = PluginRegistry.APIVersion # Backups API. backups = Backups()