GithubHelp home page GithubHelp logo

cpdark / mini-shop-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from allen7d/mini-shop-server

0.0 0.0 0.0 3.62 MB

基于 Flask框架开发的微信小程序后端,用于构建小程序商城。

License: MIT License

Python 68.25% PLpgSQL 31.75%

mini-shop-server's Introduction

mini-shop-server

基于 Flask框架开发的微信小程序后端,用于构建小程序商城。

三端分离

客户端: mini-shop-wx,基于美团的 mpvue框架开发的微信小程序。(未开始,占坑)

服务端: mini-shop-server,基于 Flask框架构建 RESTful API。(正在实现中)

CMS: mini-shop-cms, 基于 Flask框架。(未开始,占坑)

开发工具

  • Python 3.6(虚拟环境:pipenv)
  • MySQL
  • PyCharm(开发工具)
  • Navicat(数据库可视化管理工具)

pipenv的安装

《pipenv 的用法指南》

如果还未安装pip3包管理工具,请先执行如下语句

$ sudo apt install python3-pip

安装 pipenv

$ pip3 install pipenv

导入 mysql 数据

本地启动

$ git clone https://github.com/Alimazing/mini-shop-server.git
$ cd mini-shop-server
$ pipenv shell # 进入虚拟环境 or 构建新的虚拟环境
$ pipenv install # 安装包依赖
$ python shema.py # 启动入口文件

目录结构

| |____app.py
| |____api
| | |______init__.py
| | |____v1
| | | |______init__.py
| | | |____address.py
| | | |____user.py
| | | |____token.py
| | | |____theme.py
| | | |____client.py
| | | |____order.py
| | | |____product.py
| | | |____banner.py
| | | |____category.py
| |____validators
| | |____params.py
| | |______init__.py
| | |____forms.py
| | |____base.py
| |____service
| | |______init__.py
| | |____app_token.py
| | |____token.py
| | |____order.py
| | |____user_token.py
|____fake.py
|____README.md
|____code.md
|____Pipfile
|____.gitignore

生成临时管理员信息

$ python fake.py

自动生成 api 接口文档

Swagger 是一个规范和完整的框架,用于生成、描述、调用和可视化 RESTful 风格的 Web 服务。

本项目使用flasgger库自动生成 Swagger风格(Demo)的API文档。

查阅API文档

在浏览器端输入:http://localhost:5001/apidocs/#/

mini-shop-server's People

Contributors

bidoli avatar allen7d 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.