A DB-API2 compliant module in Python for interacting with a SQLite relational database.
Questions tagged [pysqlite]
140 questions
8
votes
4 answers
pysqlite - how to save images
I need to save an image file into sqlite database in python. I could not find a solution. How can I do it?
Thanks in advance.

Mustafa Zengin
- 2,885
- 5
- 21
- 24
8
votes
4 answers
Shall I bother with storing DateTime data as julianday in SQLite?
SQLite docs specifies that the preferred format for storing datetime values in the DB is to use Julian Day (using built-in functions).
However, all frameworks I saw in python (pysqlite, SQLAlchemy) store the datetime.datetime values as ISO formatted…

Slava Tutushkin
- 186
- 8
7
votes
1 answer
python and sqlite - escape input
Using python with a sqlite DB - whats the method used for escaping the data going out and pulling the data coming out?
Using pysqlite2
Google has conflicting suggestions.

Wizzard
- 12,582
- 22
- 68
- 101
6
votes
1 answer
Basic pySQLite example?
Gang, I am beginning to play around with pySQLite and I'm trying to find an example that illustrates how to query the db for existing records before inserting a new record if it doesn't already exist in the db. I feel I am overlooking a very basic…

5k1z k17
- 73
- 1
- 3
6
votes
2 answers
'from sqlite3 import dbapi2 as sqlite3' vs 'import sqlite3'?
When I see the examples for pysqlite, there are two use cases for the SQLite library.
from sqlite3 import dbapi2 as sqlite3
and
import sqlite3
Why there are two ways to support the sqlite3 api? What's the difference between the two? Are they the…

prosseek
- 182,215
- 215
- 566
- 871
6
votes
3 answers
Checking duplicate while inserting in SQLite
I am trying to insert a data into SQLite database using Python.
INSERT INTO DATA_TABLE(UID,LABEL) VALUES (NULL, "UK")
WHERE "UK" NOT EXISTS IN (SELECT LABEL FROM DATA_TABLE);
This query is dynamically generated from Python and I am checking…

ukanth
- 2,718
- 5
- 28
- 38
6
votes
2 answers
pip install pysqlite leads to the following error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 and `#include "sqlite3.h"`
pip install pysqlite fails, and outputs the following with the following error log:
➜ ~ pip install pysqlite
Collecting pysqlite
Using cached pysqlite-2.6.3.tar.gz
Installing collected packages: pysqlite
Running setup.py install for pysqlite
…

Nathan Basanese
- 8,475
- 10
- 37
- 66
6
votes
6 answers
Change text_factory in Django/sqlite
I have a django project that uses a sqlite database that can be written to by an external tool. The text is supposed to be UTF-8, but in some cases there will be errors in the encoding. The text is from an external source, so I cannot control the…

Krumelur
- 31,081
- 7
- 77
- 119
5
votes
2 answers
What are the differences among SQLite3 from Python2.5, pysqlite, and APWS
I would like to know the differences among SQLite3 from Python2.5, pysqlite, and APSW?
I have a bumpy run when trying to install pysqlite on Windows Vista with python2.5, see following:
Download SQLite from http://sqlite.org/download.html and unzip…

leo
- 547
- 6
- 11
5
votes
1 answer
Detect the FTS3 extension in SQLite3
What is the SQLite query to detect if the FTS3 extension module is installed? Or is it possible to get a list of installed extensions with an SQLite3 query? It has to work with pysqlite2.
I know that I can get the list of tables using SELECT * FROM…

pts
- 80,836
- 20
- 110
- 183
4
votes
1 answer
Building Python 2.5 with full Sqlite3 as a user on linux
This is a bit of a complex problem, at least for me. Here it goes:
I'm working as a user on linux server and it's safe to assume that installing any package not already installed is simply impossible.
Also I need to set up working Python 2.5 (not…

nimdil
- 1,361
- 10
- 20
4
votes
2 answers
Django on CentOS
I'm looking to use Django on a shared host that's running an unknown version of CentOS. My main problem is trying to interface with a database. The server has MySQL installed, but not MySQL-python. I initially thought of suggesting running "yum…

Kyle Cronin
- 77,653
- 43
- 148
- 164
4
votes
0 answers
How to install pysqlite for python3.4.2
i use kali linux and i need sqlite3 driver for python3.4.2 i tried
the pysqlite install, but get an erorr. pls help me how to correct the
erorr thanks in advance
root@thinkpad:~# python --version
Python 3.4.2
root@thinkpad:~# pip…

Droid
- 1,410
- 8
- 23
- 37
4
votes
2 answers
What is a difference between "sqlite" and "pysqlite2/sqlite3" modules?
I gave up to make "sqlite3" working but I just found out (with help("modules")) that I have "sqlite" module. I tested it (create table, insert some values and so on) and it works fine. But before I start to use this module I would like to know if it…

Verrtex
- 4,317
- 9
- 34
- 33
4
votes
2 answers
How to get _sqlite3.so file?
I have installed Python 2.6.2.. I did it "locally" since I do not have root permissions. With this version of Python I wanted to use module called "sqlite3" (it is called "pysqlite" in earlier versions). In theory I had to be able to use this…

Verrtex
- 4,317
- 9
- 34
- 33