How to set minimum and maximum fields of a custom ID property using Python I have created a custom property and want to set a minimum and a maximum for it through python; I tried to make it using bpy.ops.wm.properties_edit but it didn't work,so how can I edit a custom property with Python?

Here is how I defined my property:

bpy.data.objects[name of my object]['name of my property'] = 2
This is what you do to set min to 0 and max to 500, the soft_min and soft_max is optional and is only for dragging in gui:

ob = bpy.data.objects[name_of_my_object]

# this is a dictionary containing IDprops settings
# this creates it and erases it:
ob["_RNA_UI"] = {}

# add properties settings like this:
ob["_RNA_UI"]['name_of_my_property'] = {"min":0.0,
                                        "max": 500.0,
                                        "soft_min":0.0,
                                        "soft_max":500.0}