腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
3
回答
如何使用Pycharm运行快速api服务器?
、
、
我有一个简单的API函数如下, async def read_root():return {"Hello": "World"}
uvicorn
main:app 因为我们没有直接调用任何python文件,所以不可能从Pycharm调用
uvicorn
浏览 5
提问于2020-07-12
得票数 70
回答已采纳
2
回答
最小
FastAPI
静态文件服务器脚本
、
我想编写一个从脚本启动的最小
FastAPI
静态文件服务器,该脚本允许您指定要在命令行上共享的目录。在之后,我写了这个。import
uvicorn
from
fastapi
.staticfiles import StaticFiles server.mount("/static", StaticFiles(dire
浏览 14
提问于2022-11-23
得票数 0
回答已采纳
2
回答
如何在Google中运行
FastAPI
/
Uvicorn
?
、
、
、
我试图使用
FastAPI
/
Uvicorn
在Google上运行一个“本地”web应用程序,就像我见过的一些Flask应用程序示例代码一样,但无法让它工作。有人能做到吗?非常感谢。成功安装
FastAPI
和
Uvicorn
!pip install
uvicorn
-qfrom
fastapi
import
FastAPI
@a
浏览 20
提问于2020-09-10
得票数 9
回答已采纳
1
回答
作为视窗服务的
FastAPI
、
、
、
、
我正在尝试将
FastAPI
作为windows服务运行,但我找不到任何文档或文章来将
Uvicorn
作为windows服务运行。我也尝试过使用NSSM,但是我的windows服务停止了。
浏览 38
提问于2021-01-06
得票数 1
回答已采纳
2
回答
PyInstaller和
FastAPI
(超过最大递归深度)
、
、
我需要创建一个
可执行文件
,因此我使用的是PyInstaller。File "....看来PyInstaller在
fastapi
上有一些问题。from
fastapi
import
FastAPI
app =
FastAPI
()
uvicorn
.run(&
浏览 20
提问于2020-04-28
得票数 5
2
回答
当
uvicorn
workers>1时,
uvicorn
和带有pyinstaller问题的
fastAPI
、
、
、
我检查了PyInstaller and
FastAPI
(maximum recursion depth exceeded)和Pyinstaller-compiled
Uvicorn
server doesnot start correctly
FastAPI
演示main.py import
uvicorn
浏览 965
提问于2020-12-24
得票数 1
1
回答
在
FastAPI
中未找到详细信息
现在我在
fastapi
中调用这个类,但是我得到了de from orientation_corrector import OrientationCorrectorfrom
fastapi
import
FastAPI
, File, UploadFile result=Orien
浏览 23
提问于2021-06-21
得票数 0
1
回答
Uvicorn
的目的是什么?
、
、
、
、
我应该和
FastAPI
一起工作。我被教导说
FastAPI
和
Uvicorn
一起使用。
Uvicorn
到底是什么。我不知道
uvicorn
和
FastAPI
到底在做什么。有人能解释吗?
浏览 3
提问于2022-03-11
得票数 5
回答已采纳
1
回答
Uvicorn
服务器不在windows的终端中工作。
、
(
fastapi
) E:\Python Practice\
FastAPI
\
fastapi
\
fastapi
>
uvicorn
main:app --reload INFO:
Uvicorn
浏览 8
提问于2022-06-15
得票数 -1
回答已采纳
1
回答
fastapi
Uvicorn
服务器设置url而不是ip
、
、
我正在尝试将
Uvicorn
localhost配置为一个url,而不是让它看起来像的。如果你能给我指个方向就太好了。谢谢
浏览 4
提问于2021-04-16
得票数 1
2
回答
错误:加载ASGI应用程序时出错。导入字符串"main“必须格式为"<module>:<attribute>”
、
、
尝试使用
uvicorn
测试我的第一个
FastAPI
应用程序。以下代码是在朱庇特笔记本上编写的,并保存为目录中的'main.py':/home/userasync def root():来自我正在运行的
浏览 15
提问于2022-02-08
得票数 1
2
回答
ModuleNotFoundError -在运行
uvicorn
时导入
、
、
当我通过
uvicorn
安装的包运行它时,我的导入是不可见的。它在python终端上工作。==0.61.1pydantic==1.6.1
uvicorn
==0.12.2但是当我通过
uvicorn
运行时,应用程序会在
fastapi
_sqlalchemy导入上抛出错误。'import
uvicorn
浏览 13
提问于2020-10-25
得票数 1
1
回答
如何关闭快速an发生器内的插座?
、
、
、
import
fastapi
import socket with socket.socket() as s:s.connect(("127.0.0.1", port)) yield s.recv(1024) async def stre
浏览 3
提问于2022-11-08
得票数 0
回答已采纳
1
回答
如何将swagger设置为使用
FastAPI
查询参数中的列表字段
、
、
在使用列表字段使用依赖注入的应用程序时,参数会自动转到SwaggerUI中的请求体:import
uvicorn
()): 这意味着我不能在傲慢的UI中测试它。即使我将字段更改为查询,它仍然不起作用:import <
浏览 11
提问于2022-07-21
得票数 1
回答已采纳
1
回答
FastAPI
多个路由绑定到同一个函数。如何知道哪一个是被要求的
、
假设我有两条路径指向相同的函数@app.get('/api/test')
浏览 6
提问于2022-07-18
得票数 2
1
回答
FastAPI
python:如何在后台运行线程?
、
、
、
我正在使用
FastAPI
在python中创建一个服务器,我希望一个与我的API无关的函数每5分钟在后台运行一次(比如检查API中的内容并根据响应打印内容)。
uvicorn
.run(app, host="0.0.0.0", port=8000, reload=True) _worker_thread = Thread(target=start_worker
浏览 63
提问于2022-01-27
得票数 4
回答已采纳
2
回答
用
fastApi
、uvloop、windows开发是不可能的吗?
、
我在Youtube的课堂上学习
fastapi
我成功了。除了[uvloop]模块之外,我还意识到uvloop没有安装在windows中,我的开发环境是Windows + PyCharm。
浏览 7
提问于2022-01-16
得票数 2
1
回答
AttributeError:'
FastAPI
‘对象没有属性’记录器‘
、
在将记录器添加到快速API时,我面临一个问题,它将显示import
uvicorn
if __name__ == '__mai
浏览 11
提问于2020-01-16
得票数 6
1
回答
如何让
fastapi
文档与部署在aks中的码头容器一起工作?
、
、
、
"""This package contains functions for metadata attribute extraction""" async def index(request: Request): return {"Api is running"} import <
浏览 30
提问于2020-08-21
得票数 1
1
回答
如何在本地主机上使用Fast加载index.html文件?
、
、
return templates.TemplateResponse("index.html", context= {"request": request}) 在这两种情况下,我无法使用:from
fastapi
.staticfiles似乎from
fastapi
import
FastAPI
也无法被解析,但是在我尝试加载html文件之前,这并没有阻止程序工作,
浏览 6
提问于2022-09-20
得票数 0
回答已采纳
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
腾讯会议
云直播
对象存储
活动推荐
运营活动
广告
关闭
领券