# add driver for a shapekey via python?

how can i add a driver for a shapekey via python?

shape_keys.animation_data.driver_button_add(True)


or

obj=bpy.context.active_object


The Problem is that it can't find the shape key and shape keys are getting their driver with a different method; so I'm a bit confused how it can be added by python correctly. Sorry I'm new to Python. Thanks for your help!

import bpy

obj = bpy.context.active_object