__init__.py 770 B

1234567891011121314151617181920212223
  1. # Copyright (c) 2018 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from UM.PluginRegistry import PluginRegistry
  4. from cura.API.Backups import Backups
  5. from cura.API.Interface import Interface
  6. ## The official Cura API that plug-ins can use to interact with Cura.
  7. #
  8. # Python does not technically prevent talking to other classes as well, but
  9. # this API provides a version-safe interface with proper deprecation warnings
  10. # etc. Usage of any other methods than the ones provided in this API can cause
  11. # plug-ins to be unstable.
  12. class CuraAPI:
  13. # For now we use the same API version to be consistent.
  14. VERSION = PluginRegistry.APIVersion
  15. # Backups API
  16. backups = Backups()
  17. # Interface API
  18. interface = Interface()