As a follow up to my last post about getting spatial going in MongoDB on OpenShift, today we are going to put a web service in front of it using Python. There are several goals for this article:
1. Learn a little bit about Flask - a Python web framework
2. Learn about how to connect to MongoDB from Python
Create a REST Style. web service to use in our SoLoMo application
I hope by the end you can see how using a Platform. as a Service can get you going with Python, MongoDB, and Spatial faster than you can say…“Awesome Sauce”. We have a lot of ground to cover so let’s dig right in.
Creating the Python application
Here is OpenShift the command line to create the Python app
CODE:
rhc app create -t python-2.6 -a pythonws
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/301743/viewspace-741898/
,如需转载,请注明出处,否则将追究法律责任。