Questions tagged [oursql]

oursql is a set of MySQL bindings for python 2.4+, including python 3.x.

  • oursql has real parameterization, sending the SQL and data to MySQL completely separately.
  • oursql allows text or binary data to be streamed into the database and streamed out of the database, instead of requiring everything to be buffered in the client.
  • oursql can both insert rows lazily and fetch rows lazily.
  • oursql has unicode support on by default.
  • oursql supports python 2.4 through 2.7 without any deprecation warnings on 2.6+ (see PEP 218) and without completely failing on 2.7 (see PEP 328).
  • oursql runs natively on python 3.x.
  • oursql is licensed under the BSD license.
11 questions
6
votes
3 answers

Oursql insallation failing wtih "cython not found"

Trying to install oursql driver for python3x and sqlalchemy0.8 on ubuntu 12.10. It fails with the following error. sudo pip-3.2 install oursql Downloading/unpacking oursql Running setup.py egg_info for package oursql Traceback (most recent call…
lukik
  • 3,919
  • 6
  • 46
  • 89
3
votes
1 answer

pip install ourSQL "Cannot find the file specified"

When I try to use pip to install oursql I run into the following error C:\Users\user>pip install oursql Collecting oursql Using cached…
cgc
  • 43
  • 4
2
votes
3 answers

Oursql install : error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I've gone through most of the previous errors and installed already in a python 3.5 virtualenv: python3-dev libmysqlclient-dev libmariadb-client-lgpl-dev libmariadb-client-lgpl-dev-compat But sudo pip install oursql still get this…
ting12
  • 81
  • 10
2
votes
3 answers

oursql extremely slow in inserting data

I am trying to store some data generated by a python script in a MySQL database. Essentially I am using the commands: con = oursql.connect(user="user", host="host", passwd="passwd", db="testdb") c = con.cursor() …
Curious2learn
  • 31,692
  • 43
  • 108
  • 125
1
vote
3 answers

Error while installing oursql in virtualenv

When I try to install oursql under virtual environment using pip install oursql I get following error: Collecting oursql Using cached oursql-0.9.3.1.tar.bz2 Building wheels for collected packages: oursql Running setup.py bdist_wheel for oursql …
Raghav Mittal
  • 210
  • 3
  • 9
1
vote
1 answer

Speedup MySQL INSERT operation with .executemany()

How can I use executemany here to speed up the process. with dest_conn.cursor() as dcur: while True: rows = scur.fetchmany(size=25) if rows: place_holders = "(%s)" % ','.join("?"*len(rows[0])) …
Shiplu Mokaddim
  • 56,364
  • 17
  • 141
  • 187
1
vote
1 answer

how to solve this deadlock with gevent and oursql

I have the following code from a complex project: from gevent import monkey monkey.patch_all() import gevent import oursql def run(num): conn = oursql.connect(host = ...) cursor = conn.cursor() cursor.execute('start transaction') …
jiakai
  • 501
  • 2
  • 14
0
votes
1 answer

python3 SqlAlchemy error TypeError: Type str doesn't support the buffer API

I am writing a django app that calls a script using SQLAlchemy. The following query runs successfully with Python v2.x: engine = create_engine('mysql+oursql://ag:529382Ag@localhost/gp?charset=utf8&use_unicode=0',pool_recycle=3600) query =…
GreatGather
  • 861
  • 2
  • 11
  • 24
0
votes
2 answers

Python oursql treating a string variable as a char array

Forgive my ignorance as I am new to oursql. I'm simply trying to pass a parameter to a statement: cursor.execute("select blah from blah_table where blah_field = ?", blah_variable) this treated whatever is inside the blah_variable as a char array so…
Arash Sharif
  • 542
  • 7
  • 16
0
votes
1 answer

Error on installing oursql for Python 3.1

I'm trying to work with oursql in python 3.2, and it's really not going so well. Facts: I downloaded oursql binary and ran the installer. I have MySQL 5.1 installed. I separately downloaded the libmysql dll and placed it in the System32…
BIU
  • 2,340
  • 3
  • 17
  • 23
0
votes
1 answer

Import error on oursql

Im trying to set up some programs to work on a website with cherrypy framework on my laptop. Now i need oursql for the website. I used for both Cython and OurSQL executables. I found a site with executables from the cython download site ("Christoph…
ProCx
  • 199
  • 5
  • 18