V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
xhawk
V2EX  ›  Python

请教 Python 下生成 swagger 的接口文档的最佳姿势

  •  
  •   xhawk · 14 天前 via Android · 1260 次点击

    我有个 python 项目,有什么办法能快速的生成某几个目录的 Python 文件的接口文档的不,最好能指定生成的规则,有些接口不用生成。

    7 条回复    2024-05-03 11:10:33 +08:00
    zyxbcde
        1
    zyxbcde  
       14 天前 via iPhone
    找个带 swagger 的 web 框架
    byaiu
        2
    byaiu  
       14 天前
    sphinx 吧?
    django 有 drf-spectacular ,至于 flask 应该也有
    FYFX
        3
    FYFX  
       14 天前
    用支持 openAPI 的框架吧,我知道 litestar 是默认支持的
    xhawk
        4
    xhawk  
    OP
       14 天前 via Android
    我是一个原有的 python 项目中,需要能针对某几个目录生成 swagger json. 方便导入 yapi 调试。
    mikaelson
        5
    mikaelson  
       14 天前
    最近刚用了 fastapi 写了个小项目,挺好的生成文档这一块
    Vcide
        6
    Vcide  
       13 天前
    Pydantic+FastAPI
    zeusho871
        7
    zeusho871  
       12 天前
    django+ninja 或者直接 fastapi 自带的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1204 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 18:23 · PVG 02:23 · LAX 11:23 · JFK 14:23
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.