make APIs match

Nuke from_action and change to for_environment in python, and do the
corresponding changes in c#.

Tasks
- [ ] Make the set of tests for python and c# compatible, i.e. test for the same things.