如何使用 FastAPI 模型类属性作为架构字段
我正在发现 Python Web 框架 FastAPI,我想知道是否可以使用数据库模型类属性作为模式,因为每次我需要对模型类和 pydantic 类的字段进行硬编码?
谢谢
I am discovering the Python web framework FastAPI and I am asking if its possible to use the database model class attributes as a schema, because every time I need to hardcode my fields for the model classes as well as the pydantic classes??
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论