1. 程式人生 > >Python_eve_REST_API一個簡單的python web框架

Python_eve_REST_API一個簡單的python web框架

很簡單的一個web框架,簡單試驗一下

pip install eve
Development
$ git clone http://github.com/pyeve/eve.git
Initialized empty Git repository in ~/dev/eve/.git/
$ cd eve
$ virtualenv venv
New python executable in venv/bin/python
$ . venv/bin/activate
pip install flask-pymongo
這裡要https科學上網一下(squid代理)
$ python setup.py install
...
Finished processing dependencies for Eve

寫個run.py

from eve import Eve

app = Eve()

if __name__ == '__main__':
    app.run()

寫個settings.py

DOMAIN = {'people': {}}

搞定
這裡寫圖片描述

這裡寫圖片描述