Hi Sheetal,
Are you trying to upload an image using the post method of the Requests Library?
How you go about this vary's depending on the application, best bet is to do the upload in a browser with dev tools open and then look at the request body and replicate that.
The most common methods i've seen are:
1) read the image file, then base64 encode the image data, this base64 encoded string then becomes the post body, and the content type header is image/jpg, image/png, etc depending on the image type
2) read the image file, then base64 encode the image data, this base64 encoded string is then embedded inside an XML or JSON element, other elements often included the filename and content type
These are the most common and simply ways an application could want an image uploaded, I have seen more complex processes as well.
I hope I understood your question and this helps,
Dave.