How to import bpy module in PyCharm IDE? I know that bpy is not available in python outside of blender which is totally fine, however I'd like to work on my blender python scripts using an IDE (in my case PyCharm from Jetbrains).

Therefore I'd like to somehow let the IDE know about the bpy module so my import bpy statements are not marked red and also autocompletion features would work. What would be the best way to achieve this?
I don't have PyCharm on this machine, but have used it with Blender on my dev machine. So I can't detail the setup now - but for starters, see this dev doc regarding debugging Blender with Eclipse: https://wiki.blender.org/index.php/Dev:Doc/Tools/Debugging/Python_Eclipse

should be close enough for you to use with PyCharm (which is a custom eclipse). I presume you're okay with local (single machine) debugging - that's what I have setup in Eclipse/PyDev, tho in other Python work, I came across a browser-based setup that I adapted to PyDev - so now I debug Blender in the Browser - with the api docs in the 'tab next door' - very convenient.

if you're interested in remote debugging instead, see this recent dev blog entry: http://code.blender.org/2015/10/debugging-python-code-with-pycharm/

m23d