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

求推荐 python 靠谱的 mock server

  •  
  •   SlipStupig · 2016-10-07 22:51:54 +08:00 · 4125 次点击
    这是一个创建于 2764 天前的主题,其中的信息可能已经有所发展或是发生改变。
    这两天由于折腾一个前后对接的 case ,用了两个 python 的 mock server 项目: mockpy 和 mock-server , mockpy 死活运行不起来, mock-server 可以运行但是连个文档都没有,实在不知道从哪里下手,求各位帮助
    9 条回复    2016-10-08 23:17:59 +08:00
    neoblackcap
        1
    neoblackcap  
       2016-10-07 23:21:09 +08:00
    还后端 mock 个毛线,叫前端用 express 自己解决。反正他们现在工作不是也要开 dev server 么?
    SlipStupig
        2
    SlipStupig  
    OP
       2016-10-08 08:28:50 +08:00
    @neoblackcap 情况比较特殊,我也不想,但是没办法,都得我来做
    findex
        3
    findex  
       2016-10-08 09:09:02 +08:00
    不懂你的具体需求是做什么
    SlipStupig
        4
    SlipStupig  
    OP
       2016-10-08 09:32:57 +08:00
    @findex 前端需要有一个假的后端方便开发
    VicYu
        5
    VicYu  
       2016-10-08 09:37:35 +08:00 via Android
    swagger ,就是配置麻烦
    winkidney
        6
    winkidney  
       2016-10-08 14:41:07 +08:00   ❤️ 1
    mock-server 不需要文档……
    直接在 web 界面添加某个 URL 的返回就好了……
    https://github.com/tomashanacek/mock-server
    也是刚好贡献过两行没用的代码, boom
    lrh3321
        7
    lrh3321  
       2016-10-08 14:41:50 +08:00
    自己用 flask 写一个,路由规则里匹配所有的。

    然后,根据 url 去数据库里取预置的数据,返回给前端。
    leopku
        8
    leopku  
       2016-10-08 18:03:23 +08:00   ❤️ 1
    json-server
    nodejs 的,很好用
    mingyun
        9
    mingyun  
       2016-10-08 23:17:59 +08:00
    @leopku 这个方便
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   759 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 21:53 · PVG 05:53 · LAX 14:53 · JFK 17:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.