See official Pyhop repository for more info

Installing Pyhop
Pyhop works in both Python 2.7 and 3.2. It's fairly light-weight and can doesn't require many dependencies

HTN Planning
Pyhop integrates hierarchical task network planning with ordinary programming. HTN operators and methods - which refer to explicit states - are actually just ordinary Python functions

Documentation
Pyhop maintains the same expressive power as classical planners, and is compatible with conventional programming techniques.