How to create a custom property on an object by pressing UI button?
you want ID properties, they can be set per object

obj = bpy.data.objects['whatever']
obj['some_property_name'] = 'some_value'
obj['some_property_name_2'] = 33

&gt;&gt;&gt; obj['some_property_name_2']
... 33