推荐学习书目
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
gosky
V2EX  ›  Python

请大家比较下 fastapi 系和 aio-libs 系

  •  
  •   gosky · Apr 23, 2024 · 2956 views
    This topic created in 749 days ago, the information mentioned may be changed or developed.
    rt
    注意,不是单比较 fastapi 和 aiohttp ,
    而是 fastapi 和它依赖的一堆项目,比较 aio-libs/*生态
    另,感觉 aio-libs/*生态,可以加上 attr+cattrs 。

    注意,我要构建的是一定规模的微服务系统,不是小单体架构
    7 replies    2024-04-24 10:59:41 +08:00
    crackidz
        1
    crackidz  
       Apr 23, 2024
    这两个也不是冲突的啊...感觉你像比较的是 aiohttp?
    ynkkdev
        2
    ynkkdev  
       Apr 23, 2024
    你指的是这玩意?: https://github.com/aio-libs

    大概扫了一眼,应该也没啥在 fastapi 里面用不了的。

    fastapi 本身也就是个缝合怪,也没啥生态不生态的,基本也是各种轮子各玩各的,aio 的库应该都能用
    gosky
        3
    gosky  
    OP
       Apr 24, 2024
    @youngce 个人感觉 fastapi 适合开发单体服务,依赖很严重,很难用
    个人更喜欢 aio-libs
    zhusimaji
        4
    zhusimaji  
       Apr 24, 2024
    你搞异步的时候 fastapi+aio libs 没啥问题啊,这两个搭档 ok 的
    009694
        5
    009694  
       Apr 24, 2024 via iPhone
    你在说什么? aiolibs 是指一系列基于 asyncio 的库,fastapi 广义上也是,他们并不冲突。
    CloveAndCurrant
        6
    CloveAndCurrant  
       Apr 24, 2024
    fastapi 本身就是基于 starlette 的封装,库直接又没什么冲突。说个题外话,比起 fastapi ,我更喜欢 starlette ,没看出了 fastapi 有什么特别。
    CodeCodeStudy
        7
    CodeCodeStudy  
       Apr 24, 2024
    @CloveAndCurrant #6 我也这么觉得。fastapi 就是对 starlette 和 pydantic 简单封装了一下,起了个好听的名字,然后就出名了,没多少自己的东西。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5619 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 07:32 · PVG 15:32 · LAX 00:32 · JFK 03:32
    ♥ Do have faith in what you're doing.