check class present in package using python code example Example: python check namespace has instance if hasattr(a, 'property'): a.property