Giter Site home page Giter Site logo

blog-server-python's Introduction

使用方式

项目运行

  • 安装依赖
pip install -r requirements.txt
  • 运行(如果使用了sql数据库,需要在运行之前初始化数据库)
python manage.py runserver

项目结构

  • app 具体业务
    • api 业务逻辑
    • models 数据处理层
    • wraps 装饰器
    • utils 工具类
    • constants.py 常量
  • doc 文档
  • manage.py 启动
  • requirement.txt 依赖

提交笔记

  • 全局404制定404页面,有api/user和api/article两个基础接口, 根目录返回一个静态的网页。
  • 数据库的初始化
  • 更改项目结构
  • token校验+异常捕获

api 文档

baseUrl: /api/v1

用户

地址 类型 详情 token
auth/login GET 登入

文章

地址 类型 详情 token
/article/list GET 文章列表
/article GET 文章详情
/article POST 创建文章
/article PUT 修改文章

lable

地址 类型 详情 token
/lable/list GET 标签列表

参考

数据库+Flask-script+flask_sqlalchemy

blog-server-python's People

Contributors

yghysdr avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.