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

Python3 如何实现发送 Request,对端返回 Response 后继续执行函数的异步 IPC 通信比较好?

  •  
  •   a251922581 · Oct 10, 2017 · 3193 views
    This topic created in 3272 days ago, the information mentioned may be changed or developed.
    用 NodeJs 的的 Rest API 的话,对端收到了请求先返回响应然后不 return 的话继续执行函数接下去的代码:
    app.get('/url', function(req, res) {
    // Do something...
    res.json(some_json_response);
    // 继续干活
    };
    Python 正在查资料中,找了一会儿还没弄明白好一点的解决方案。。求助。。
    2 replies  •  2017-10-10 23:51:50 +08:00
    ivechan
        1
    ivechan  
       Oct 10, 2017
    aiohttp 应该就是你想要的。
    但是不用想太多,和 nodejs 的肯定有区别。
    raiz
        2
    raiz  
       Oct 10, 2017
    科普视频
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2566 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 06:18 · PVG 14:18 · LAX 23:18 · JFK 02:18
    ♥ Do have faith in what you're doing.