You can access this information for every
FloatProperty through Python. It requires the access of RNA properties. The approach is the same for UI sliders as it is for node sockets, but as an easier introduction the first example uses a property of Eevee's render settings.
Example 1 - Regular UI Property
Let's start with finding the limits of Eevee's bloom threshold. The value that is currently set can be accessed through:
This will only give us the current float value. If we want to get the property, we have to access the RNA. The following code gets the underlying
There are four limits to the property
hard_max. The soft limits are used for the minimum and maximum value that can be reached through the slider, while the hard limits are the actual maximum and minimum values that can be entered.*
* This doesn't seem to apply to the nodes though, they allow to enter float values higher than the hard limits.
bloom_threshold = bpy.context.scene.eevee.bl_rna.properties["bloom_threshold"]
For the bloom threshold the values are:
Example 2 - Node Socket
The following example assumes that the material with the node exists. Normally you would need to check for the existence of the keys first.
Assume that you have a material called Material which contains a node Noise Texture where you would like to know the limits of the input Scale and the output Fac.
First the node has to be accessed (assuming that all these elements exist):
noise_texture = bpy.data.materials["Material"].node_tree.nodes["Noise Texture"]
For the limits of the Scale input we need to access the Property that is behind
default_value of the socket that we're interested in. Scale is an input socket.
scale_property = noise_texture.inputs["Scale"].bl_rna.properties["default_value"]
The limits are:
The same approach can be used to find the limits of an output socket, like Fac.
fac_property = noise_texture.outputs["Fac"].bl_rna.properties["default_value"]
The limits for this socket are:
There may be cases where the limits change dynamically, which isn't covered by this answer. It looks like a similar approach could possibly work for Vector sockets, where the limits likely apply for each dimension.