We know that Pearson correlation tells you the linear correlation (proportionality) between two variables, meanwhile Spearman rank correlation tells you how far you have a monotonic relation (if one grows, the other variable grows or declines too).
Both of them would fail terribly to tell dependence if for example $Y$ = $X^2$, because there is no linear correlation and neither does the function show monotonicity.
Is there any coefficient that measures the degree of dependency? Is it implemented in Python?