Skip to main content

Secure SQLite databases with AES-256 encryption

Project description

SqliteSec

Secure SQLite databases with AES-256 encryption

SqliteSec protects your SQLite databases by encrypting them with industry-standard AES-256 encryption. Share sensitive data safely or work with confidential information without compromising security.

Installation

pip install sqlitesec

Features

  • AES-256 encryption - Military-grade security for your databases
  • Seamless integration - Drop-in replacement for standard SQLite connections
  • Automatic encryption/decryption - Transparent operation with your existing code
  • Secure file sharing - Safely send encrypted databases to others

Quick Start

from sqlitesec import SqliteSec
import os

# Initialize with your encryption key
key = os.urandom(32)  # Generate a secure 256-bit key
sqs = SqliteSec(key)

# Create and use encrypted database
conn = sqs.connect("secure.db")
cursor = conn.cursor()

# Standard SQLite operations work normally
cursor.execute('CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)')
cursor.execute('INSERT INTO users (name) VALUES (?)', ('Alice',))
conn.commit()

# Always close properly to ensure encryption
sqs.close(conn, "secure.db")

Reading Encrypted Data

# Reconnect and read data
conn = sqs.connect("secure.db")
cursor = conn.cursor()

cursor.execute('SELECT name FROM users WHERE id = 1')
user_name = cursor.fetchone()[0]
print(f"User: {user_name}")

sqs.close(conn, "secure.db")

API Reference

SqliteSec(key)

Initialize with encryption key (32 bytes for AES-256).

connect(database_path)

Open encrypted database connection. Returns standard SQLite connection object.

close(connection, database_path)

Properly close connection and ensure data is encrypted.


Security Note: Always use a strong, randomly generated key and store it securely.

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

sqlitesec-1.0.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

sqlitesec-1.0.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file sqlitesec-1.0.0.tar.gz.

File metadata

  • Download URL: sqlitesec-1.0.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for sqlitesec-1.0.0.tar.gz
Algorithm Hash digest
SHA256 029cbd70c16bfa200eca602797f5cb4c1cce0efdeff638e2e9c539af24e716d3
MD5 10a40dae0c420eb7e72561f6a2676b65
BLAKE2b-256 20ddece590b9d0942ddc86c568b3544ef90b4e0ca4fc1477cc9ef27f03f13a96

See more details on using hashes here.

File details

Details for the file sqlitesec-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sqlitesec-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for sqlitesec-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e87e40084e74789576ad54646c62bf1abe008f84a12b4d6093ccb16656cfcd33
MD5 123d7a35526d550740686b8f63e9f169
BLAKE2b-256 4ba2a4d25be783c9b17b3dd40bcde72a3357a01c14babedc5b9b9492ab367460

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