# AddonName, __name__ will print the folder name class AddonNamePreferences(bpy.types.AddonPreferences): # the id of addon in preference bl_idname = __name__ attributeA: StringProperty attributeB: StringProperty # it is also the name for bpy.context.preferences.addons[KEY] reference. just the name w.o version bpy.context.preferences.addons[__name__] bpy.context.preferences.addons[AddonName].preferences.attributeA