Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
使用 Fast API 接收图像,使用 cv2 处理然后返回
我正在尝试构建一个 API 它接收图像并对其进行一些基本处理 然后使用 Open CV 和 Fast API 返回它的更新副本 到目前为止 我的接收器工作得很好 但是当我尝试对处理后的图像进行 Base64 编码并将其发送回时 我的移动前端
python
opencv
FastAPI
如何在 FastAPI 的 CORS 中间件中正确使用正则表达式?
我有一个使用 FastAPI 后端和 Next js 前端的应用程序 在具有稳定来源的开发和生产中 我能够毫无问题地使用 CORSMiddleware 不过 我已经使用 Vercel 部署了 Next js 前端 并且希望利用 Vercel
python
regex
FastAPI
vercel
starlette
FastAPI 的部分更新
我想在 FastAPI 中实现支持部分更新的 put 或 patch 请求 官方文档 https fastapi tiangolo com tutorial body updates 真的很混乱 我不知道如何执行该请求 我不知道items位
python
python3x
sqlalchemy
FastAPI
pydantic
在 FastAPI 端点中进行并发.futures.ThreadPoolExecutor 调用是否危险?
我有以下测试代码 import concurrent futures import urllib request URLS http www foxnews com http www cnn com http europe wsj com
python
python3x
FastAPI
concurrentfutures
ASGI
如何使用FastAPI返回JSON格式的数据?
我在两者中编写了具有相同功能的相同 API 应用程序FastAPI and Flask 但是 当返回 JSON 时 两个框架之间的数据格式不同 两者使用相同的json库 甚至相同的代码 import json from google clo
python
json
serialization
FastAPI
如何上传大文件(≥3GB)到FastAPI后端?
我正在尝试将大文件 3GB 上传到我的 FastAPI 服务器 without将整个文件加载到内存中 因为我的服务器只有 2GB 可用内存 服务器端 async def uploadfiles upload file UploadFile
python
FileUpload
FastAPI
starlette
pythonrequeststoolbelt
如何从 FastAPI 应用程序获取每条路线路径?
我是 FastAPI 和 Python 的新手 我需要获取根路径上的所有路由并将其显示给用户 但是 我找不到递归获取所有路径的方法 API 的版本借助以下工具进行 VersionedFastAPI并且当前代码没有给出版本内部的路径 它只返回
python
FastAPI
如何在测试 FastAPI 应用程序时触发生命周期启动和关闭?
作为 FastAPI 的新手 我正在努力测试比我在教程中看到的稍微困难的代码 我用fastapi cache模块和Redis是这样的 from fastapi import Depends FastAPI Query Request fro
python
Testing
Redis
Pytest
FastAPI
FastAPI 相当于 Flask 的 request.form,用于不可知的表单
我尝试从 Flask 迁移到 FastAPI 我想知道是否有类似于 Flask 的东西 payload request form to dict flat False payload key payload key 0 for key in
python
FastAPI
如何在 PostgreSQL 数据库中存储 NumPy 数组?
目前 我正在创建 npz 压缩文件来存储大型 NumPy 数组 因此 每次我需要从文件加载数组时 由于这是一个频繁的过程 我就考虑将 NumPy 数组存储在数据库中 我正在使用 PostgreSQL 数据库 您可以使用 bytea 列来完成
python
database
postgresql
NumPy
FastAPI
这个访问令牌是如何存储在客户端的,参见FastAPI的教程“Simple OAuth2 with Password and Bearer”
总的来说 我对 FastAPI 和 OAuth2 还很陌生 我刚刚完成了教程 带有密码和承载的简单 OAuth2 https fastapi tiangolo com tutorial security simple oauth2 这基本上
http
swagger
FastAPI
如何在 fastapi 响应中包含非 pydantic 类?
我想将自定义类包含到路线的响应中 我主要使用嵌套pydantic BaseModels 在我的应用程序中 因此最好返回整个内容 而无需编写从内部数据表示到路由返回内容的转换 只要一切继承自pydantic BaseModel这很简单 但我正
python
FastAPI
pydantic
使用 fastAPI 将嵌套模式插入数据库?
我最近开始了解 fastAPI 并通过教程和其他文档进行了工作 尽管 fastAPI 有很好的文档记录 但我找不到有关如何在使用数据库时处理嵌套输入的信息 为了测试 我写了一个非常小的family有两种模型的 API class Membe
python3x
FastAPI
pydantic
如何将自定义 HTML 内容添加到 FastAPI Swagger UI 文档?
我需要在 FastAPI 应用程序的 Swagger UI 中添加一个自定义按钮 我发现这个答案 https stackoverflow com questions 74661044 add a custom javascript to t
python
swagger
FastAPI
SwaggerUI
openAPI
FastAPI:CORS 中间件不支持 GET 方法
我尝试在 FastAPI 框架上使用 CORS 但它不适用于 GET 方法 这是我正在处理的代码 from fastapi import FastAPI from fastapi middleware cors import CORSMid
FastAPI
如何在 fastapi 中使用刷新令牌?
我试图找到一个使用的例子刷新令牌 https auth0 com blog refresh tokens what are they and when to use them 在 fastapi 中 快速APIdocs https fast
python
python3x
JWT
FastAPI
FastAPI 表示缺少文件夹名称作为模块
我有一个与 Pycharm 中的 FastAPI 和 uvicorn 相关的问题 我的项目具有以下结构 LearningPy
python
pymongo
FastAPI
fromtyping_extensions import ParamSpec ImportError:无法从“typing_extensions”导入名称“ParamSpec”
我正在研究 FastAPI 并发生了这个错误 from fastapi import FastAPI import uvicorn app FastAPI app get ping async def ping return Hello I
FastAPI
如何使用 pydantic 模式从 sqlalchemy 关系中获取单独的列
我有4张桌子 Hardware SoftwareName SoftwareVersion and Software The Software表有一个one to many有关系SoftwareName表和SoftwareVersion桌子
python
sqlalchemy
FastAPI
pydantic
使 Pydantic BaseModel 字段可选,包括 PATCH 的子模型
正如已经问过的similar有疑问 我要支持PATCHFastApi 应用程序的操作 调用者可以根据需要指定 Pydantic 的任意数量的字段BaseModel 有子模型 这样高效PATCH可以执行操作 而调用者不必仅仅为了更新两个或三个
python
FastAPI
CRUD
pydantic
«
1
2
3
4
5
6
...10
»