Run sqlite3 using python at command line

I installed python3.3 and I am learning django 1.5x. I chose sqlite3 to learn with django, and I am using python, django - and trying to run - sqlite3 on the command line in windows. The whole problem is this: where is the sqlite3 file to run a command like > sqlite3 my_db ?? I tried to find in C:\Python33\Lib\sqlite3;C:\Python33\Lib and search in Windows Explorer, but I really can not find. I run my projects in C: \ projects \ mysite

+6
source share
2 answers

Assuming you want to check the database created by django, and assuming the sqlite executable is installed, you can do the following to run sqlite at the command prompt:

 ./manage.py dbshell 

More information about this command can be found in the django documentation.

+8
source

Python itself does not contain the sqlite3 command.

But the SQLite library includes a simple sqlite3 command-line utility (or sqlite3.exe for Windows) that allows the user to manually enter and execute SQL commands in the SQLite database. You can download it from here .

+7
source

Source: https://habr.com/ru/post/946872/


All Articles