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

问下你们使用 gevent+flask 的时候用的什么 mysql 驱动

  •  
  •   simple2025 · Mar 31, 2017 · 5400 views
    This topic created in 3505 days ago, the information mentioned may be changed or developed.
    Mysqldb这个库好像不支持异步
    如果都用的是这个库的话,不支持也没有办法。。
    我也只能用 Mysql-python
    
    
    11 replies  •  2017-03-31 14:27:54 +08:00
    KIDJourney
    KIDJourney
    Mar 31, 2017
    1
    不用 pymysql 不能 patch 吧。
    Zuckonit
    Zuckonit
    Mar 31, 2017
    2
    官方的 mysql-connector 吧,生产环境用了很长时间了
    simple2025
    simple2025
    OP
    Mar 31, 2017
    3
    @KIDJourney 你是用的 pymysql ?有没有出什么问题?
    est
    est
    Mar 31, 2017
    4
    simple2025
    simple2025
    OP
    Mar 31, 2017
    5
    @est 你用的什么?
    mengskysama
    mengskysama
    Mar 31, 2017
    6
    mysql-connector 生产环境 ok ,就是 connection pool 有点蠢 size 是死的不是很好处理,想要灵活连接池重用得自己写。
    simple2025
    simple2025
    OP
    Mar 31, 2017
    7
    @mengskysama mysql-connector 到底是哪个库?
    ideascf
    ideascf
    Mar 31, 2017
    9
    用 pymysql 才能和 gevent 配合
    VYSE
    VYSE
    Mar 31, 2017
    10
    兼容的 MySQLdb 可以用豆瓣的 greenify+patch 后的 MySQLdb,不过貌似不维护了
    原来也用过 ultramysql,有坑也不维护了
    生产环境还是选 pure python 实现
    simple2025
    simple2025
    OP
    Mar 31, 2017
    11
    @VYSE pymysql?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5202 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 70ms · UTC 02:52 · PVG 10:52 · LAX 18:52 · JFK 21:52
    ♥ Do have faith in what you're doing.