472,333 Members | 1,075 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,333 software developers and data experts.

Pure Python interface to MySQL?

Does there exist a pure Python version of a MySQL module? I've got a data
logging application that needs to run on a whole bunch of OSs, ranging from
Windows to a dozen different unix flavors on all sorts of hardware.

Portability is much more important than performance for this application.
We're only inserting a few hundred records a day from each system, but the
ability to quickly deploy to anywhere I've already got Python running is
key.
Oct 6 '08 #1
8 1467
On Tue, Oct 7, 2008 at 9:15 AM, Roy Smith <ro*@panix.comwrote:
Does there exist a pure Python version of a MySQL module? I've got a data
logging application that needs to run on a whole bunch of OSs, ranging from
Windows to a dozen different unix flavors on all sorts of hardware.

Portability is much more important than performance for this application.
We're only inserting a few hundred records a day from each system, but the
ability to quickly deploy to anywhere I've already got Python running is
key.
My solution (tm):

You could implement a proxy server/client
sub-system that you could use to chuck MySQL
statements at the server which would in-turn
use the Python DB-API (mysql-python) module.
This way you would only have to maintain
_one_ instance of the mysql-python module
on the server.

cheers
James

--
--
-- "Problems are solved by method"
Oct 6 '08 #2
Roy Smith wrote:
Does there exist a pure Python version of a MySQL module?
A quick google search turns up this:

http://github.com/mopemope/pure-pyth...master/pymysql

I've never used it, though, so I have no idea whether it works or how
well it works.

HTH,

--
Carsten Haese
http://informixdb.sourceforge.net
Oct 6 '08 #3
In article <kf*****************@nlpi064.nbdc.sbc.com>,
Carsten Haese <ca***********@gmail.comwrote:
Roy Smith wrote:
Does there exist a pure Python version of a MySQL module?

A quick google search turns up this:

http://github.com/mopemope/pure-pyth...master/pymysql
Awesome, thanks!

You have better searching skills than I do, apparently :-)
Oct 7 '08 #4
On Tue, Oct 7, 2008 at 2:12 PM, Tino Wildenhain <ti**@wildenhain.dewrote:
Will you be asking for a pure python implementation of mysql
in the next question? ;) Why not use the proxy approach (for
example via xmlrpc) as suggested by James or just spill to
a file? :-)
You could for example use an alternative database:
* buzhug
* ZODB
* Durus
* Or any of: pickle, shelve, XML, or flat file.

All mentioned above are pure-python.
I am maintaining a more up-to-date version of
buzhug in my development brnaches if you're
interested.

cheers
James

--
--
-- "Problems are solved by method"
Oct 7 '08 #5
James Mills wrote:
On Tue, Oct 7, 2008 at 9:15 AM, Roy Smith <ro*@panix.comwrote:
>Does there exist a pure Python version of a MySQL module? I've got a data
logging application that needs to run on a whole bunch of OSs, ranging from
Windows to a dozen different unix flavors on all sorts of hardware.

Portability is much more important than performance for this application.
We're only inserting a few hundred records a day from each system, but the
ability to quickly deploy to anywhere I've already got Python running is
key.

My solution (tm):

You could implement a proxy server/client
sub-system [...]
Or instead of reinventing the wheel, you could use SQLRelay
(http://sqlrelay.sourceforge.net/), which has a pure-Python DB-API module.

-- Gerhard

Oct 7 '08 #6
In article <ma**************************************@python.o rg>,
"James Mills" <pr******@shortcircuit.net.auwrote:
You could for example use an alternative database:
* buzhug
* ZODB
* Durus
* Or any of: pickle, shelve, XML, or flat file.
Unfortunately, I don't own the database, just the clients that have to
insert records into it :-(
Oct 7 '08 #7
http://github.com/mopemope/pure-pyth...master/pymysql
>
I've never used it, though, so I have no idea whether it works or how
well it works.
On the project's home page I noticed:

pymysql is Pure Perl MySQL driver.

pymysql is the Python DB API-2.0 interface.

support MySQL versions 4.1-5.1

Hopefully the code is more robust than the author's proofreading. ;-)

Skip
Oct 7 '08 #8
Gerhard Häring wrote:
James Mills wrote:
>On Tue, Oct 7, 2008 at 9:15 AM, Roy Smith <ro*@panix.comwrote:
>>Does there exist a pure Python version of a MySQL module? I've got a
data
logging application that needs to run on a whole bunch of OSs,
ranging from
Windows to a dozen different unix flavors on all sorts of hardware.

Portability is much more important than performance for this
application.
We're only inserting a few hundred records a day from each system,
but the
ability to quickly deploy to anywhere I've already got Python running is
key.

My solution (tm):

You could implement a proxy server/client
sub-system [...]

Or instead of reinventing the wheel, you could use SQLRelay
(http://sqlrelay.sourceforge.net/), which has a pure-Python DB-API module.
Unfortunately, the Python interface for SQLRelay seems to include parts
written in C. What a pity.

-- Gerhard

Oct 7 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ravi | last post by:
Hi, I did some googling, and found that there doesn't seem to be a pure python MySQL communication module. There is one for perl however,...
1
by: Yong Wang | last post by:
Hi, All: We have a network management system written in C++, MysQL, and Hp SNMP. It works in Solaris command line. When I wrote a similar python...
6
by: Michael Foord | last post by:
I'm writing a couple of modules that store information about user 'behaviour'. E.g. a user accesses a certain page of a website at a certain...
51
by: Noam Raphael | last post by:
Hello, I thought about a new Python feature. Please tell me what you think about it. Say you want to write a base class with some...
10
by: callmebill | last post by:
I'm getting my feet wet with making Python talk to MySQL via ODBC. I started on Windows, and it went smoothly enough due to the ODBC stuff that...
13
by: Chris Seymour | last post by:
HI All, Does such a beast exist? Have been looking but haven't seen any. Any insight would be appreciated. Thanks. Chris
0
by: nejucomo | last post by:
Hi folks, Quick Synopsis: A test script demonstrates a memory leak when I use pythonic extensions of my builtin types, but if I use the...
13
by: Steven Bethard | last post by:
Jean-Paul Calderone <exarkun@divmod.comwrote: Interesting. Could you give a few illustrations of this? (I didn't run into the same problem at...
6
by: Miguel Guedes | last post by:
Hello, I recently read an interview with Bjarne Stroustrup in which he says that pure abstract classes should *not* contain any data. However, I...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.