Thanks @MathieuMarques for suggesting to look @ dump options and link provided, YAML documentation was not good enough to find it out.
Anyways solution is to specify width
parameter for dump
function.
i.e. yaml.dump(data, width=1000)
A better approach suggested by @RandomCoder to use yaml.dump(data, width=float("inf"))
for a permanent solution.