Questions tagged [pysqlite]

A DB-API2 compliant module in Python for interacting with a SQLite relational database.

140 questions
0
votes
1 answer

Values not being defined when outputted in Python MySQL?

Aided by a previously asked question see (How to correctly convert SQL rows to columns?), I'm attempting to apply to a MySQL connector script written in python. As seen by @Popeye 's fiddle http://sqlfiddle.com/#!9/997790/25, my attempt at returning…
Lamtheram
  • 89
  • 1
  • 7
0
votes
0 answers

Preferred SQLite datatype for cross-platform file paths?

In the beginning I used VARCHAR, at least until I found out that it supposedly doesn't support Unicode, for which reason I then switched to NVARCHAR. However, I encountered the need to insert invalid Unicode data into the database (stemming from the…
kangalio
  • 652
  • 8
  • 16
0
votes
3 answers

Python: use one sqlite query to find the NOT EXISTS result

I have a dataset of million entries, its comprised of songs and their artists. I have a track_id an artist_id. There are 3 tables tracks (track_id, title, artist_id), artists(artist_id and artist_name) and artist_term (artist_id and term). Using…
anon
  • 9
  • 3
0
votes
0 answers

Can I do writes do a sqlite database from multiple threads if I create a dedicated agent for it

My scenario is as follows: I have 10 datasets I need to process. I will be using 10 threads to process them all in parallel (each can take up to an hour). Once I find some info in the dataset I want, I will write it to the sqlite database. I might…
TreeWater
  • 761
  • 6
  • 13
0
votes
1 answer

Is their a unique signature value for the state of of an sqlite3 DB (or table)?

I was looking for some single value that tracked the writes to either the DB or an individual table in the DB. I would like to say "This data was extracted at this time, from this DB, in this state" I am not bothered about future updates recreating…
Paddy3118
  • 4,704
  • 27
  • 38
0
votes
2 answers

pysqlite get column names from csv file

I have a csv file from which I am trying to load data into pysqlite database. I am not able to find a way to extract the first row of the file and get it into the database automatically as column headers of a table. I have to enter the names…
Alhpa Delta
  • 3,385
  • 4
  • 16
  • 31
0
votes
1 answer

SQLite: readers not waiting for writers

I have around 200 tables in an SQLite database with hundreds to millions rows. These tables are queried by many concurrent processes of an OLTP application. Each table needs to be occasionally updated by a full refresh -- delete all rows and then…
Blaf
  • 2,050
  • 1
  • 11
  • 14
0
votes
1 answer

How do I resolve ImportError: No module named '_sqlite3' and No module named 'pysqlite2' python 3.5

Installing jupyter notebook from jupyter Python3 version Python 3.5.2 pip list jupyter (1.0.0) jupyter-client (5.2.3) jupyter-console (5.2.0) jupyter-core (4.4.0) Running jupyter notebook Traceback (most recent call last): File…
dwayneJohn
  • 919
  • 1
  • 12
  • 30
0
votes
1 answer

How to store selected rows into tuple?

I have following code to select rows from a SQLite database: #!/usr/bin/python3.4 # -*- coding: utf-8 -*- import sqlite3 as lite import sys csat = lite.connect('Tanuloim.db') with csat: hely = csat.cursor() for evflym in range (5, 6): …
Pal Csanyi
  • 101
  • 1
  • 9
0
votes
1 answer

How to update a column in SQLite using pysqlite where I first needed to obtain a conditional value from other data in my table?

So, I have the following issue when updating my database: I have a column in my table that I need to split in three essentially and so I have the following code: with con: cur = con.cursor() cur.execute('SELECT Column1 FROM MainTable') while…
0
votes
1 answer

How to pass datetime to sqlite

I am trying to use the results from an sqlite query in a later query. In the code below, note that exam[1] is a string and 'endtime' prints correctly. However, I don't seem to be able to pass that to the db.execute statement. To make matters more…
0
votes
1 answer

Count number of rows in Pysqlite3

I have to code on python sqlite3 a function to count rows of a table. The thing is that the user should input the name of that table once the function is executed. So far I have the following. However, I don't know how to "connect" the variable…
Emilio Zaidman
  • 117
  • 1
  • 1
  • 7
0
votes
2 answers

Integrate Djpeewee into Django to encrypt sqlite3 database

I would like to encrypt a sqlite3 database that is used by my Django project. For this purpose I would like to use pysqlcipher. Since I haven't found any ways to easily integrate pysqlcipher with Django I started wondering if it would be possible…
user1544500
  • 2,067
  • 5
  • 25
  • 35
0
votes
1 answer

How to use pysqlcipher with Django?

I would like to use sqlcipher and its python binding pysqlcipher (https://pypi.python.org/pypi/pysqlcipher) to encrypt a sqlite3 database used by Django. What would be the best way to implement this into Django? Is it doable at all?Would you do it…
user1544500
  • 2,067
  • 5
  • 25
  • 35
0
votes
0 answers

pysqlite will not work with fts3/fts4 on windows

I've compiled pysqlite 2.7.0 (2.8.1 seems to have compilation issues with Python 2.7) on Linux and Mac succesfully and was able to use fts (full text search), however using the exact same compilation steps on windows results in having pysqlite…
Naatan
  • 3,424
  • 4
  • 32
  • 51