gras: python hooks for factory