Pure Python interface to MySQL?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roy Smith

    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.
  • James Mills

    #2
    Re: Pure Python interface to MySQL?

    On Tue, Oct 7, 2008 at 9:15 AM, Roy Smith <roy@panix.comw rote:
    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"

    Comment

    • Carsten Haese

      #3
      Re: Pure Python interface to MySQL?

      Roy Smith wrote:
      Does there exist a pure Python version of a MySQL module?
      A quick google search turns up this:

      This is PyMySQL original code. Pure python interface to MySQL. - mopemope/pure-python-mysql


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

      HTH,

      --
      Carsten Haese

      Comment

      • Roy Smith

        #4
        Re: Pure Python interface to MySQL?

        In article <kfxGk.3925$Ws1 .1839@nlpi064.n bdc.sbc.com>,
        Carsten Haese <carsten.haese@ 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 :-)

        Comment

        • James Mills

          #5
          Re: Pure Python interface to MySQL?

          On Tue, Oct 7, 2008 at 2:12 PM, Tino Wildenhain <tino@wildenhai n.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"

          Comment

          • =?ISO-8859-1?Q?Gerhard_H=E4ring?=

            #6
            Re: Pure Python interface to MySQL?

            James Mills wrote:
            On Tue, Oct 7, 2008 at 9:15 AM, Roy Smith <roy@panix.comw rote:
            >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

            Comment

            • Roy Smith

              #7
              Re: Pure Python interface to MySQL?

              In article <mailman.2087.1 223353812.3487. python-list@python.org >,
              "James Mills" <prologic@short circuit.net.auw rote:
              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 :-(

              Comment

              • Skip Montanaro

                #8
                Re: Pure Python interface to MySQL?

                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


                Comment

                • =?ISO-8859-1?Q?Gerhard_H=E4ring?=

                  #9
                  Re: Pure Python interface to MySQL?

                  Gerhard Häring wrote:
                  James Mills wrote:
                  >On Tue, Oct 7, 2008 at 9:15 AM, Roy Smith <roy@panix.comw rote:
                  >>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

                  Comment

                  Working...