How skysaksham/pydbql works
PyDBQL is an interactive, file-based encrypted database and query-language application. Its principal workflow is a user command entering the shell, being parsed and dispatched, then creating or selecting a database/table, inserting validated rows, or retrieving and displaying rows with optional filtering. Metadata and row files under db/ are encrypted with the repository key. The graph reflects the current src/ implementation; legacy_code is an earlier, separate implementation. Source excerpts do not establish finer internal details beyond these calls.
Main entry points: parser.py Command parser · draw_table.py Read and filter rows · create_table.py Table definition · add_data.py Insert validation
Components 11
Interactive query shell
- Application entry
main.py - Command parser
src/parser.py
Database operations
- Database create/drop
src/drop_and_create_db.py - Table definition
src/create_table.py - Insert validation
src/add_data.py - Read and filter rows
src/draw_table.py
Encrypted file storage
- Encrypt/decrypt
src/encrypt_decrypt.py - Database files
db - Fernet key
db/key.txt
Table presentation
- Table renderer
src/draw_table.py
Other components
- Database user
Connections 20
- Database user → Application entry: starts
- Application entry → Command parser: starts shell
- Database user → Command parser: enters commands
- Command parser → Database create/drop: creates or drops
- Command parser → Table definition: creates tables
- Command parser → Insert validation: inserts rows
- Command parser → Read and filter rows: requests rows
- Command parser → Table renderer: lists metadata
- Database create/drop → Database files: creates or removes
- Table definition → Database files: writes schema
- Table definition → Encrypt/decrypt: encrypts metadata
- Insert validation → Table definition: reads schema
- Insert validation → Database files: reads and appends
- Insert validation → Encrypt/decrypt: encrypts rows
- Read and filter rows → Table definition: reads schema
- Read and filter rows → Database files: reads rows
- Read and filter rows → Encrypt/decrypt: decrypts rows
- Read and filter rows → Table renderer: displays results
- Encrypt/decrypt → Fernet key: loads key
- Table renderer → Database user: prints tables