Skip to main content

SqlCipher版Sqlite3

Project description

快速开始

  1. 安装包
pip install meca-common-db-ciphersqlite3
  1. 使用

直接使用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

meca_common_db_ciphersqlite3-1.0.3.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meca_common_db_ciphersqlite3-1.0.3-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

Details for the file meca_common_db_ciphersqlite3-1.0.3.tar.gz.

File metadata

File hashes

Hashes for meca_common_db_ciphersqlite3-1.0.3.tar.gz
Algorithm Hash digest
SHA256 0a49864e4295e99da79f187ae8c63ee6ba33ac4c428cc6d82bfe78ec64aaa081
MD5 44d8ff83690e06667a67ed77cec073de
BLAKE2b-256 11c523deeb2aeb60705cfd0e0a468348ebe518c4961f45a9f0a3ffdcff30e63b

See more details on using hashes here.

File details

Details for the file meca_common_db_ciphersqlite3-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for meca_common_db_ciphersqlite3-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 57e86dacc71d9d1e38f9e04bf131dd42eb1b076615a39dec9c1ee5bc6293c753
MD5 edbecf38e750057cded2784710e559c5
BLAKE2b-256 46d4189141b4f58bc4931fee3cfe912f5eb94cd7f55197d567ef310241b9165a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page