Pure Python interface to MySQL?

R

Roy Smith

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.
 
J

James Mills

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
 
J

James Mills

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
 
G

Gerhard Häring

James said:
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
 
R

Roy Smith

"James Mills said:
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 :-(
 
G

Gerhard Häring

Gerhard said:
James said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top