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

调用 API 调用烦了,就写了个小工具

  •  
  •   twinsant · 174 天前 · 3148 次点击
    这是一个创建于 174 天前的主题,其中的信息可能已经有所发展或是发生改变。

    快速调用一个 API:

    https://github.com/twinsant/fapi

    欢迎大家收藏使用

    15 条回复    2023-12-04 22:23:11 +08:00
    HashV2
        1
    HashV2  
       174 天前
    这和我直接用 requests 有什么区别
    blankmiss
        2
    blankmiss  
       174 天前
    确实 这和用 requests 有什么区别
    cyaki
        3
    cyaki  
       174 天前
    可以再加上 retry 逻辑 https://github.com/jd/tenacity
    一致性的同步异步接口
    sss15
        4
    sss15  
       174 天前
    @HashV2 你外卖超时了,别在这写代码了
    AboPlus
        5
    AboPlus  
       174 天前
    @HashV2 你外卖超时了,别在这写代码了
    root71370
        6
    root71370  
       174 天前
    这和我直接用 requests 有什么区别
    proxytoworld
        7
    proxytoworld  
       174 天前
    确实有点尬,requests 也可以转 json
    binge921
        8
    binge921  
       174 天前
    这个功能会影响我外卖超时么
    ho121
        9
    ho121  
       174 天前 via Android
    建议:判断 ipv4 或 v6 地址,用 ipaddress 库。

    题外话,我直接用 curl 不好么。
    token10086
        10
    token10086  
       174 天前
    这、、、、
    MrSheng
        11
    MrSheng  
       174 天前   ❤️ 2


    的确没什么区别。
    rev1si0n
        12
    rev1si0n  
       173 天前
    看了源代码,我也没看出他做了什么新操作甚至比 requests 还鸡肋,代码太乱总共几行就跟写着玩似的,用 requests 写不简单吗?
    rubygo
        13
    rubygo  
       156 天前
    @rev1si0n 可能是个小学生,鼓励一下吧。
    twinsant
        14
    twinsant  
    OP
       145 天前
    @shengminjie :) 谢谢各位大哥哥
    twinsant
        15
    twinsant  
    OP
       145 天前
    估计你们的岁数也比我外甥大不了多少:D
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3295 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 11:34 · PVG 19:34 · LAX 04:34 · JFK 07:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.