added simple support to python3
Update api.py
added decode
Python3: exceptions must derive from BaseException
little fix
added gitignore file
Python3 version