Skip to content

puwow/saltedfish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

saltedfish(咸鱼)

这是一个基于Flask框架及其插件Flask-RESTful实现的资源整合服务,以研究学习为主。

RESTful的接口设计风格

为了便于资源的有效管理,采用RESTful的设计风格。

环境安装

- [Flask](http://flask.pocoo.org)安装,用于Web应用搭建

pip install flask

- [Flask-RESTful](http://flask-restful.readthedocs.io/en/latest/)安装,用于RESTful架构

pip install flask-restful

- [Flask-Script](http://flask-script.readthedocs.io/en/latest/)安装,用于服务管理

pip install flask-script

- [peewee](http://docs.peewee-orm.com/en/stable/)安装,数据库ORM pip install peewee

数据安装

服务管理

服务启动

python manager.py server

### 服务停止

CTRL+C

资源列表

用户资源(users)

  • 获取所有用户列表(get)

http://127.0.0.1:5000/api/v1/users

- 查询用户(get)

http://127.0.0.1:5000/api/v1/users/

- 更新用户(put)

http://127.0.0.1:5000/api/v1/users/

- 新增用户(post)

http://127.0.0.1:5000/api/v1/users/

- 删除用户(delete)

http://127.0.0.1:5000/api/v1/users/

### 文件(files) ###

About

咸鱼

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages