title: check if an object supports the buffer protocol python
body: <p>I am looking for the Python equivalent of the Python C-API PyObject_CheckBuffer.</p>
  
  <p>I.e. I would like to check if an object supports the buffer protocol, but from Python.</p>