15 - Creating EC2 Windows Server Part 1 07:40 16 - Creating EC2 Windows Server Part 2 06:50 17 - Create EC2 Ubuntu Machine 10:37 18 - Create S3 Bucket 08:23 19 - Introduction 03:30 20 - AWS Credentials Setup with AWS CLI for Boto3 08:56 21 - AWS Boto3 SSH Key Pair...
0.0.0.0 --port 8081 然后访问一下 http://localhost:8081,就会看到日志输出,同时会保存在server...
# setup loggers import logging logger=logging.getLogger()logger.setLevel(logging.INFO)ch=logging.StreamHandler()fh=logging.FileHandler(filename='./server.log'))ch.setFormatter(LogFormatter())fh.setFormatter(LogFormatter())logger.addHandler(ch)#将日志输出至屏幕 logger.addHandler(fh)#将日志输出至文件...
serverMain.py是我们的入口 if __name__ == '__main__': setupLogger("kling") logging...
Setup Postgres (16.3) just up Copy the environment file and install dependencies cp .env.example .env poetry install Run the uvicorn server With default settings: just run With extra configs (e.g. logging file) just run --log-config logging.ini Linters Format the code with ruff --fix ...
Run the server with: $fastapi dev main.py╭────────── FastAPI CLI - Development mode ───────────╮│ ││ Serving at: http://127.0.0.1:8000 ││ ││ API docs: http://127.0.0.1:8000/docs ││ ││ Running in development mode, for production use: ││ │...
{secrets.DOCKER_USERNAME}}"--password-stdin dockerpushmydockerhubuser/myfastapiapp:latest -name:Deploytoserver uses:appleboy/ssh-action@master with: host:${{secrets.SERVER_HOST}} username:${{secrets.SERVER_USER}} key:${{secrets.SERVER_SSH_KEY}} script:| dockerpullmydockerhubuser/myfastapi...
打包成exe之后运行时会默认在当前路径下面找 printing_server\templates 文件夹,这个时候就会提示没有NotFound 所以我们可以在setup.py的incloude_files直接指定路径为 .\\printing_server ,生成exe之后在exe同级目录下会有 printing_server 的文件夹名称,这个时候运行exe可以正常运行。缺点 :打包时会...
FastAPI 是一个用于构建 API 的现代、快速(高性能)的 web 框架,使用 Python 3.6+ 并基于标准的 Python类型提示。 文档: https://fastapi.tiangolo.com 源码: https://github.com/tiangolo/fastapi 关键特性: 快速:可与 NodeJS 和 Go 比肩的极高性能(归功于 Starlette 和 ...
本章开启 FastAPI 的源码阅读,FastAPI是当下python web中一颗新星,是一个划时代的框架。从诞生便是以快速和简洁为核心理念。 它继承于 Starlette ,是在其基础上的完善与扩展。详细内容可以翻看我之前的源码阅读。openapi() 与 setup() 是在初始化阶段,对 OpenAPI 文档进行初始化的函数。 而 ...