# sqlite-dump
[![PyPI](https://img.shields.io/pypi/v/sqlite-dump.svg)](https://pypi.org/project/sqlite-dump/)
[![Changelog](https://img.shields.io/github/v/release/simonw/sqlite-dump?label=changelog)](https://github.com/simonw/sqlite-dump/releases)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/sqlite-dump/blob/master/LICENSE)
An improved version of `.iterdump()` for Python's `sqlite3`
## Background
Python's `sqlite3` standard library module provides a method for dumping the contents of a database out as lines of SQL that can be used to recreate the database:
```python
import sqlite3
conn = sqlite3.connect("mydb.db")
for line in conn.iterdump():
print(line)
```
This mechanism is convenient but unfortunately does not support every SQLite feature. In particular it doesn't correctly dump databases that use SQLite's full-text search functionality from the [FTS module](https://www.sqlite.org/fts5.html). This library offers an improved alternative to the `.iterdump()` method.
## Installation
Install this plugin using `pip`:
$ pip install sqlite-dump
## Usage
To loop through lines of SQL that can recreate a SQLite database file:
```python
import sqlite3
from sqlite_dump import iterdump
conn = sqlite3.connect(db_path)
for line in iterdump(conn):
print(line)
```
## Development
To contribute to this library, first checkout the code. Then create a new virtual environment:
cd sqlite-dump
python -mvenv venv
source venv/bin/activate
Or if you are using `pipenv`:
pipenv shell
Now install the dependencies and tests:
pip install -e '.[test]'
To run the tests:
pytest
挣扎的蓝藻
- 粉丝: 14w+
- 资源: 15万+
最新资源
- 基于fpga的2psk调制解调器实现,代码包括quartus和vivado两个工程版本,使用到的所有滤波器全部采用matlab设计参数,verilog代码实现,没有调用滤波器ip,可以进行任意调整或者
- 提高Python网络编程实战视频教程网络抓取爬虫07socket编程基础-.avi
- FPGA GTP aurora 8b 10b视频传输 FPGA GTP全网最细讲解 aurora 8b 10b协议OV5640视频传输 提供2套工程源码和 详细设计文档参考链接:
- C语言实现串口通信的方式
- comsol磁可调双带吸收器
- 提高Python网络编程实战视频教程网络抓取爬虫08爬虫.mp4
- 自己开发的永磁同步电机FOC矢量控制模型和代码,目前已经在项目中使用,simulink界面结合源代码仿真 包含FOC算法,SVPWM,DPWM,死区补偿,过调制,母线电流估算等功能
- 基于c++的视觉框架,不仅提供了可视化操作界面源码,还提供了视觉算法源码,方便您二次开发 视觉算法主要有:标定工具,对位工具,几何工具等等 具体涉及的常用视觉算法有:模板匹配,卡尺工具,直线拟合,边缘
- 提高Python网络编程实战视频教程网络抓取爬虫09django初探-.wmv
- Maven 设置国内源,settings.xml
- abaqus焊接仿真培训资料,含热源模型,子程序 焊接应力应变场及其数值模拟理论简介 热力耦合理论(热应力分析) 协同软件的安装和修改、Abaqus软件使用基础 焊接模型的前处理部分Dflux子程序(
- hello kitty.exe
- 水平钻进钻机(step+exb+说明书)全套技术资料100%好用.zip
- 英飞凌芯片Traveo-II Overview产品线介绍,和芯片选型
- Comsol达西与pde结合描述地下水流作用下,孔隙率不断增大,孔隙率非均质,,可进行导水路径的查看,渗流速度场,压力场均可导出 SPKC
- 利用Matlab制作一个贼简单的粒子圣诞树.txt
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈