I have been searching google for the method to display a raw image data using python libraries but couldn\'t find any proper solution. The data is taken from a camera module and
Have a look at rawpy:
import rawpy
import imageio
path = 'image.raw'
raw = rawpy.imread(path)
rgb = raw.postprocess()
imageio.imsave('default.tiff', rgb)
rgb is just an RGB numpy array, so you can use any library (not just imageio) to save it to disk.
If you want to access the unprocessed Bayer data, then do:
bayer = raw.raw_image
See also the API docs.