identify

File identification library for Python

Here are some articles that you may find helpful