Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #65737
| References | (1 earlier) <429f41e0-7fe8-4792-82f2-e438917a3add@googlegroups.com> <mailman.6536.1391858718.18130.python-list@python.org> <145766f5-6e5f-40c7-be92-3adbf1015731@googlegroups.com> <mailman.6537.1391859760.18130.python-list@python.org> <58c461a7-bf08-4258-af29-2b1d7778a85c@googlegroups.com> |
|---|---|
| Date | 2014-02-09 08:40 -0200 |
| Subject | Re: Why use _mysql module and not use MySQLdb directly? |
| From | Marcel Rodrigues <marcelgmr@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.6577.1391942408.18130.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
Another option is PyMySQL [1]. It's developed in the open at GitHub [2]. It's pure Python, compatible with both Python 2 and Python 3. It's DB-API 2 compliant. It also implements some non-standard bits that are present in MySQLdb, in order to be compatible with legacy code, notably Django (personally, I consider the use of non-standard API from a DB adapter a bug, but while the big projects don't fix it, we have to work around it). [1] https://pypi.python.org/pypi/PyMySQL [2] https://github.com/PyMySQL/PyMySQL 2014-02-08 10:09 GMT-02:00 Asaf Las <roegltd@gmail.com>: > On Saturday, February 8, 2014 1:42:30 PM UTC+2, Chris Angelico wrote: > > On Sat, Feb 8, 2014 at 10:32 PM, Asaf Las <r...@gmail.com> wrote: > > > > > Hi Chris > > > The doc says > > > https://pypi.python.org/pypi/mysql-connector-python/1.1.5 > > > MySQL driver written in Python which does not depend on MySQL C > > > client libraries and implements the DB API v2.0 specification > (PEP-249). > > > > Ah. And that links to dev.mysql.com, so it's presumably the same > > thing... would be nice if they'd say that on their own site. That's > > what I was looking for, anyhow. Confirms the suspicion. > > > > There may well be performance differences between pure-Python > > implementations and ones that go via C, but having used a > > pure-high-level-language implementation of PostgreSQL's wire protocol > > (granted, that was Pike, which is a somewhat higher performance > > language than Python, but same difference), I can assure you of what > > ought to be obvious anyway: that performance is dominated by the > > server's throughput and thus (usually) by disk speed. So it's going to > > be pretty much the same with all of them; look for ancillary features > > that might make your life easier, otherwise pick whichever you like. > > > > ChrisA > > Hmmm, they say : > > http://dev.mysql.com/doc/connector-python/en/connector-python-introduction.html > > "MySQL Connector/Python enables Python programs to access MySQL databases, > using an API that is compliant with the Python DB API version 2.0. It > is written in pure Python and does not have any dependencies except for > the Python Standard Library..." > > i guess with Oracle connector there could be one advantage - they will > try to be most compliant to their product in every aspect as they would > raiser promote their DB instead of discouraging from it. > > /Asaf > -- > https://mail.python.org/mailman/listinfo/python-list >
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Why use _mysql module and not use MySQLdb directly? Sam <lightaiyee@gmail.com> - 2014-02-08 00:52 -0800
Re: Why use _mysql module and not use MySQLdb directly? Chris Angelico <rosuav@gmail.com> - 2014-02-08 20:00 +1100
Re: Why use _mysql module and not use MySQLdb directly? Asaf Las <roegltd@gmail.com> - 2014-02-08 03:09 -0800
Re: Why use _mysql module and not use MySQLdb directly? Chris Angelico <rosuav@gmail.com> - 2014-02-08 22:25 +1100
Re: Why use _mysql module and not use MySQLdb directly? Asaf Las <roegltd@gmail.com> - 2014-02-08 03:32 -0800
Re: Why use _mysql module and not use MySQLdb directly? Chris Angelico <rosuav@gmail.com> - 2014-02-08 22:42 +1100
Re: Why use _mysql module and not use MySQLdb directly? Asaf Las <roegltd@gmail.com> - 2014-02-08 04:09 -0800
Re: Why use _mysql module and not use MySQLdb directly? Marcel Rodrigues <marcelgmr@gmail.com> - 2014-02-09 08:40 -0200
csiph-web