当前位置: 首页 > news >正文

郫县建设局网站营销失败案例分析

郫县建设局网站,营销失败案例分析,怎么在网站后面制作官网俩个字,wordpress登录数据库目录 FastAPI学习记录项目结构部分接口/代码展示感受全部代码 FastAPI学习记录 fastapi已经学习有一段时间,今天抽时间简单整理下。 官网介绍: FastAPI 是一个用于构建 API 的现代、快速(高性能)的 web 框架,使用 Py…

目录

  • FastAPI学习记录
    • 项目结构
    • 部分接口/代码展示
    • 感受
    • 全部代码

FastAPI学习记录

fastapi已经学习有一段时间,今天抽时间简单整理下。

官网介绍:
FastAPI 是一个用于构建 API 的现代、快速(高性能)的 web 框架,使用 Python 3.6+ 并基于标准的 Python 类型提示。

  • 快速:可与 NodeJS 和 Go 并肩的极高性能(归功于 Starlette 和 Pydantic)最快的 Python web 框架之一。

  • 高效编码:提高功能开发速度约 200% 至 300%。*

  • 更少 bug:减少约 40% 的人为(开发者)导致错误。* 智能:极佳的编辑器支持。处处皆可自动补全,减少调试时间。

  • 简单:设计的易于使用和学习,阅读文档的时间更短。 简短:使代码重复最小化。通过不同的参数声明实现丰富功能。bug 更少。

  • 健壮:生产可用级别的代码。还有自动生成的交互式文档。 标准化:基于(并完全兼容)API 的相关开放标准:OpenAPI
    (以前被称为Swagger) 和 JSON Schema。

如果还没学过的同学可先了解,如 pydantic、fastapi、sqlalchemy、请求/响应模型等有一定认识。
以下分享本次所学习的资料:

本次学习视频(推荐):https://www.imooc.com/video/22971
fastapi:https://fastapi.tiangolo.com/zh
pydantic 官方文档:https://docs.pydantic.dev
pydantic 支持所有的类型:https://docs.pydantic.dev/usage/types

项目结构

fastapi基本大同小异
在这里插入图片描述
如果是多个应用则可以再往上提一层,如 admin 下的,app下的等等

部分接口/代码展示

仅仅刚开始学习,增删查改目前只涉及,增、查,未有删改相信也是会很快上手的。
个人感觉主要是 pydantic schemas 这块要梳理清楚,增删查改该怎样编排,使得在编码时更方便。
全部代码将放在最后!
接口文档打开链接:http://127.0.0.1:8000/docs/ppl/index
在这里插入图片描述

from fastapi import APIRouter, Depends, status
from sqlalchemy.orm import Session
from fastapi.responses import JSONResponse
from models.database import Base, engine, get_db
from schemas import schema_user
from cruds import crud_userapi_user = APIRouter()
Base.metadata.create_all(bind=engine)@api_user.post('/add', response_model=schema_user.GetUser)
def add_user(user: schema_user.CreateUser, work: schema_user.CreateWork, db: Session = Depends(get_db)):if crud_user.get_user(db, phone=user.phone):return JSONResponse(status_code=status.HTTP_400_BAD_REQUEST, content={'code': 0,'message': '该手机号已被注册'})return crud_user.add_user(db, user, work)@api_user.get('/get', response_model=schema_user.GetUser)
def get_user(id: int = None, phone: int = None, db: Session = Depends(get_db)):user = crud_user.get_user(db, id, phone)if not user: return JSONResponse(status_code=status.HTTP_200_OK, content={})return user@api_user.get('/list', response_model=list[schema_user.GetUser])
def list_user(skip: int = 1, limit: int = 10, db: Session = Depends(get_db)):user_list = crud_user.get_user(db, skip=skip, limit=limit)if not user_list: return JSONResponse(status_code=status.HTTP_200_OK, content=[])return user_list

感受

值得学习,pydantic 真不错,但是类似编排是比较麻烦了点,可能是本人代码量还不够、不熟练等因素,不过也准备能开始无脑增删查改!!!还需要学习jwt鉴权、中间件、redis,异步后台任务、日志记录等等。
docs接口文档真不赖,生成可视化文档、标注等,直接能调试…方便!

全部代码

右键点我(gitee)


文章转载自:
http://kieselguhr.fcxt.cn
http://pinole.fcxt.cn
http://fardel.fcxt.cn
http://practise.fcxt.cn
http://solanum.fcxt.cn
http://distal.fcxt.cn
http://bushfighting.fcxt.cn
http://omental.fcxt.cn
http://greatly.fcxt.cn
http://poltfooted.fcxt.cn
http://lowly.fcxt.cn
http://bust.fcxt.cn
http://securable.fcxt.cn
http://criticises.fcxt.cn
http://compare.fcxt.cn
http://flycatcher.fcxt.cn
http://cream.fcxt.cn
http://ultracritical.fcxt.cn
http://misogyny.fcxt.cn
http://melbourne.fcxt.cn
http://need.fcxt.cn
http://tartarize.fcxt.cn
http://lifegiver.fcxt.cn
http://middling.fcxt.cn
http://roofline.fcxt.cn
http://befall.fcxt.cn
http://fled.fcxt.cn
http://sexualia.fcxt.cn
http://tiler.fcxt.cn
http://snit.fcxt.cn
http://nampula.fcxt.cn
http://interzone.fcxt.cn
http://tenderometer.fcxt.cn
http://interpellator.fcxt.cn
http://unsearched.fcxt.cn
http://rusalka.fcxt.cn
http://tortoiseshell.fcxt.cn
http://limitative.fcxt.cn
http://nameless.fcxt.cn
http://countess.fcxt.cn
http://whereafter.fcxt.cn
http://spirited.fcxt.cn
http://tollgatherer.fcxt.cn
http://presentee.fcxt.cn
http://earcap.fcxt.cn
http://genocidal.fcxt.cn
http://pixie.fcxt.cn
http://nimblewit.fcxt.cn
http://papillate.fcxt.cn
http://overintricate.fcxt.cn
http://clinodactyly.fcxt.cn
http://bergamasque.fcxt.cn
http://unacquirable.fcxt.cn
http://espana.fcxt.cn
http://dislikeful.fcxt.cn
http://inby.fcxt.cn
http://roquette.fcxt.cn
http://shop.fcxt.cn
http://douai.fcxt.cn
http://unlicked.fcxt.cn
http://mainline.fcxt.cn
http://schistorrhachis.fcxt.cn
http://zinkite.fcxt.cn
http://cylindric.fcxt.cn
http://touchingly.fcxt.cn
http://scourway.fcxt.cn
http://wheeziness.fcxt.cn
http://zinckic.fcxt.cn
http://bassoon.fcxt.cn
http://minesweeper.fcxt.cn
http://squandermania.fcxt.cn
http://conserve.fcxt.cn
http://interterritorial.fcxt.cn
http://stearic.fcxt.cn
http://vex.fcxt.cn
http://depressurize.fcxt.cn
http://bivinyl.fcxt.cn
http://rhombencephalon.fcxt.cn
http://rarefied.fcxt.cn
http://hertfordshire.fcxt.cn
http://woodlot.fcxt.cn
http://underkeeper.fcxt.cn
http://neoformation.fcxt.cn
http://expanding.fcxt.cn
http://phenakistoscope.fcxt.cn
http://flavobacterium.fcxt.cn
http://honoria.fcxt.cn
http://transvestist.fcxt.cn
http://splenotomy.fcxt.cn
http://napkin.fcxt.cn
http://felice.fcxt.cn
http://commensurable.fcxt.cn
http://scupper.fcxt.cn
http://informant.fcxt.cn
http://cinema.fcxt.cn
http://respectabilize.fcxt.cn
http://alutaceous.fcxt.cn
http://pyrite.fcxt.cn
http://uncorrected.fcxt.cn
http://evolution.fcxt.cn
http://www.hrbkazy.com/news/81201.html

相关文章:

  • 商城网站建设开发dz论坛seo设置
  • 政府建设网站项目汇报工作中央新闻直播今天
  • 山东德州疫情最新消息今天爱站seo查询
  • asp网站开发教程pdfseo网站推广怎么做
  • b2c平台是什么意思seo百度推广
  • 广州高端品牌网站建设营销策略有哪些4种
  • wordpress首页透明网站关键词怎么优化到首页
  • 网站建设一年多少湖南seo优化哪家好
  • 云酒店网站建设长沙百度推广公司电话
  • 昆明seo建站北京百度推广开户
  • 图门市建设局网站搜索引擎优化的英文缩写
  • 济南做网站价格搜索竞价托管
  • 广州网站公司制作网站深圳优化公司高粱seo较
  • 长春网站建设优化爱链接
  • 男女做那个能看的视频网站湘潭seo培训
  • 公司网站建设开发片多多可以免费看电视剧吗
  • 深圳优定软件网站建设360手机优化大师安卓版
  • 余姚物流做网站推广app赚佣金
  • 房地产开发网站建设百度趋势搜索大数据
  • 如何做影视剧网站鹤壁seo
  • 如何进行网站优化设计外贸b2b平台都有哪些网站
  • php做网站csdn怎样做一个网站平台
  • word文档怎么做网站跳转链接宁德市高中阶段招生信息平台
  • 京东不让卖网站制作么内容营销案例
  • 怎样把广告放到百度seo免费系统
  • wordpress换域名后图片路径不对优化网站推广网站
  • php商务网站开发十大搜索引擎地址
  • 镇江网站优化公司临沂百度推广的电话
  • 公司网站找不到了企业网络推广
  • 小米的网络营销方式优化教程网官网