V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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 · 2867 views
    This topic created in 3122 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   ·   Solana   ·   1002 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 20:11 · PVG 04:11 · LAX 13:11 · JFK 16:11
    ♥ Do have faith in what you're doing.