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
a251922581
V2EX  ›  Python

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

  •  
  •   a251922581 · 2017-10-10 22:05:11 +08:00 · 2480 次点击
    这是一个创建于 2383 天前的主题,其中的信息可能已经有所发展或是发生改变。
    用 NodeJs 的的 Rest API 的话,对端收到了请求先返回响应然后不 return 的话继续执行函数接下去的代码:
    app.get('/url', function(req, res) {
    // Do something...
    res.json(some_json_response);
    // 继续干活
    };
    Python 正在查资料中,找了一会儿还没弄明白好一点的解决方案。。求助。。
    2 条回复    2017-10-10 23:51:50 +08:00
    ivechan
        1
    ivechan  
       2017-10-10 23:38:12 +08:00
    aiohttp 应该就是你想要的。
    但是不用想太多,和 nodejs 的肯定有区别。
    raiz
        2
    raiz  
       2017-10-10 23:51:50 +08:00
    科普视频
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1491 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 17:09 · PVG 01:09 · LAX 10:09 · JFK 13:09
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.