add support for direction in resource listing. fix resource listing tests. add very basic sample Flask project.