improve python api and examples, diverse fixes

can you drop the name (uint32_t ns -> uint32_t) from the signature to keep the format consistent?

same applies below.