Simple APIs: add support for writing and reading attributes

Created by: williamfgc