cloudflare / cloudflare/python-workers-examples

Suggestions for fastapi support

未关闭
#3 12 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
309
派生
69
平均合并
3 天 11 小时
30 天内合并 PR
13

描述

I often use FastAPI to build the backend of my applications, so I was excited to see that I can write code using Python and FastAPI with Cloudflare Workers. However, after using it, I don't feel as comfortable as before.

For example, if I want to access my D1 database, I need to define the function's parameters as `req: Request` and use `env = req.scope["env"]` to get the `env`. Doing so means FastAPI can't help me validate my parameters, which is one of the main advantages of using it. Additionally, the lack of type hints makes development harder for me.

On top of that, the absence of an ORM for D1 makes it quite troublesome to use, do you have any plans to develop an ORM?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。