Git Product home page Git Product logo

python-web-server's Introduction

web 框架 -- Python

基于 python socket 模块实现的 web 框架

  • 通过底层 socket 监听端口得到的 HTTP 请求进行解析,�处理,返回响应。框架实现了中间件机制。
  • 采用 MVC 架构:
    • M: 实现了具备 CURD 操作 的 ORM,数据保存于本地文件
    • V: html 文件
    • C: 框架解析请求之后,会调用路由函数处理请求从而实现数据操作 / 返回视图
  • 通过中间件机制实现 静态文件访问 以及 csrf 验证
  • 实现了用户模块的基本功能(登录 \ 登出 \ 注册)
  • 实现了 TODO 模块的增、删、改、查的功能(CURD)
  • 前端通过 ajax 进行异步请求,实现数据的更新

登录/注册

Todo 列表

开发

在目录底下,输入

python app.py

即可在 localhost:3000 查看到页面效果

python-web-server's People

Contributors

cxphoe 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.