使用棉花糖为烧瓶构建rest api。
Flask-Restler的Python项目详细描述
烧瓶restler–使用Marshmallow为Flask构建rest api。
已经建立了对SQLAlchemy、Peeweeorm和Pymongo的支持。
示例“hello user”和烧瓶回收器:
fromflask_restlerimportApi,Resource# flask_restler.Api is subclass of Flask.Blueprintapi=Api('My awesome API',__name__,url_prefix='/api/v1')# flask_restler.Resource is subclass of Flask.views.View@api.connectclassHelloResource(Resource):defget(self,resource=None):return'Hello World!'# Register with your applicationfromyour_projectimportappapp.register_blueprint(api)if__name__=='__main__':app.run()
运行应用程序并在浏览器中打开http://localhost:5000/api/v1/。
Requirements
- Python2.7+,3.4+
Usage
正在处理文档。想帮忙吗?创建公关。
Bug tracker
如果您有任何建议、错误报告或 烦恼请向问题追踪者报告 在https://github.com/klen/flask-restler/issues
License
根据麻省理工学院的许可证(请参阅许可证)
如果你想对这个项目表示感谢,欢迎来到 寄明信片到:
Kirill Klenov pos. Severny 8-3 MO, Istra, 143500 Russia