capi: allow setting some elements by index
tempcommitting python api stuff