SqlCipher版Sqlite3
Project description
快速开始
- 安装包
pip install meca-common-db-ciphersqlite3
- 使用
直接使用sqlite3读取数据库
from meca.common.db.ciphersqlite3 import sqlite3
conn = sqlite3.connect('test.db')
conn.execute('PRAGMA key=<key>')
row = conn.execute('select * from sqlite_master').fetchone()
conn.close()
print(row)
使用sqlalchemy读取数据库
from meca.common.db.ciphersqlite3 import Engine
from sqlalchemy import create_engine
engine :Engine = create_engine('sqlite:///en01.db').pw('<key>').readonly()
...
函数
.pw: 设置key.pr: 设置rawkey.readonly: 设置只读
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file meca_common_db_ciphersqlite3-1.0.3.tar.gz.
File metadata
- Download URL: meca_common_db_ciphersqlite3-1.0.3.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a49864e4295e99da79f187ae8c63ee6ba33ac4c428cc6d82bfe78ec64aaa081
|
|
| MD5 |
44d8ff83690e06667a67ed77cec073de
|
|
| BLAKE2b-256 |
11c523deeb2aeb60705cfd0e0a468348ebe518c4961f45a9f0a3ffdcff30e63b
|
File details
Details for the file meca_common_db_ciphersqlite3-1.0.3-py3-none-any.whl.
File metadata
- Download URL: meca_common_db_ciphersqlite3-1.0.3-py3-none-any.whl
- Upload date:
- Size: 2.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57e86dacc71d9d1e38f9e04bf131dd42eb1b076615a39dec9c1ee5bc6293c753
|
|
| MD5 |
edbecf38e750057cded2784710e559c5
|
|
| BLAKE2b-256 |
46d4189141b4f58bc4931fee3cfe912f5eb94cd7f55197d567ef310241b9165a
|