How do I extract C values from a Python object?

That depends on the object’s type. If it’s a tuple, PyTuple_Size returns its length and PyTuple_GetItem returns a given item. Lists have similar functions, PyList_Size