Giter VIP home page Giter VIP logo

python-web's Introduction

python-web


基于fastapi,学习验证向

mysql8安装教程

  1. 创建虚拟环境
 python -m venv venv  

第二个参数是创建虚拟环境的位置。通常,您可以在您的项目中创建它并将其命名为 venv

  1. 激活虚拟环境
 # activate virtual environment
 source venv/bin/activate 
  # windows
 .\venv\Scripts\activate.bat 

如果你想切换项目或以其他方式离开你的虚拟环境,只需运行:

 deactivate # 或者 exit()
  1. 安装fastapi
 pip install "fastapi[all]"

以上安装还包括了 uvicorn,你可以将其用作运行代码的服务器。 doc:https://fastapi.tiangolo.com/zh/tutorial/#fastapi

  1. 启动服务器
 uvicorn main:app --reload

uvicorn main:app 命令含义如下:

  • main:main.py 文件(一个 Python「模块」)。
  • app:在 main.py 文件中通过 app = FastAPI() 创建的对象。
  • --reload:让服务器在更新代码后重新启动。仅在开发时使用该选项。

mysql

-- 创建库
CREATE DATABASE lichonglou_db;

-- 删除库
DROP DATABASE lichonglou_db;

-- 查看库
SHOW DATABASES;

--- 使用库
use lichonglou_db;

--- 退出库
exit;

我是不会用命令行建库建表的,所以我用的是navicat

python-web's People

Contributors

shiwanmenghuxiahuashan avatar

Watchers

 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.