โโ โโ โโโโโโโ
โโ โโ โโ โโโโโโโโ โโ
โโโโโ โโโโ โโโโโ โโโโ โโโโโ โโโโ โโโโโ โโโโโ โโโโโโ โโโโโ โโโโ โโ โโโ โโโโโ
โโ โโ โโโโโ โโ โโโโโ โโ โโ โโโโโ โโโโโ โโโโโ โโโโโ โโ โโ โโโโโ โโโโ โโโโโ
โโโโโ โโโโโ โโ โโโโโ โโโโโ โโโโโ โโโโโ โโโโโ โโโโโโโโ โโ โโ โโโโโ โโ โโโ โโโโโ
|
|
|
|
# Clone the repository
git clone https://github.com/xsyncio/databaseSnake.git
cd databaseSnake
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # Linux/Mac
# .venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Or install as package
pip install -e .# Run the application
python main.py
# Or run as module
python -m dbsearcher๐ธ Screenshot Preview
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โโ โโ โโโโโโโ โ
โ โโ โโ โโ โโโโโโโโ โโ โ
โ โโโโโ โโโโ โโโโโ โโโโ โโโโโ โโโโ โโโโโ โโโโโ โโโโโโ โโโโโ โโโโ โโ โโโ โ
โ โโ โโ โโโโโ โโ โโโโโ โโ โโ โโโโโ โโโโโ โโโโโ โโโโโ โโ โโ โโโโโ โโโโ โ
โ โโโโโ โโโโโ โโ โโโโโ โโโโโ โโโโโ โโโโโ โโโโโ โโโโโโโโ โโ โโ โโโโโ โโ โโโโ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ v1.0.0 | by Xsyncio | https://github.com/xsyncio โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
๐ Files: 18 | ๐พ Size: 9718.45 MB
๐ Search Examples:
โข User ID: 556343434
โข Phone: +19000000000
โข Name: John
โข Email: example@mail.eg
1. Search in databases
2. Exit
Choose an option: _
graph TD
A[Terminal] --> B["__main__.py"]
B --> C[databaseSnake]
C --> D[SearchEngine]
D --> E[FileIndexer]
D --> F[ThreadPoolExecutor]
D --> G{Parser Selection}
G --> H[TextParser - .txt]
G --> I[CSVParser - .csv]
G --> J[SQLParser - .sql]
C --> K[Rich Console UI]
D --> L[mmap for large files]
databaseSnake/
โโโ ๐ main.py # Entry point
โโโ ๐ pyproject.toml # Project config
โโโ ๐ base/ # Your database files go here
โ โโโ data.csv
โ โโโ users.txt
โ โโโ dump.sql
โโโ ๐ dbsearcher/ # Main package
โโโ ๐ __init__.py # Package init
โโโ ๐ __main__.py # CLI entry
โโโ ๐ constants.py # Configuration
โโโ ๐ exceptions.py # Custom errors
โโโ ๐ logging.py # Rich logging
โโโ ๐ types.py # Type definitions
โโโ ๐ search/ # Search engine
โ โโโ engine.py # Main coordinator
โ โโโ indexer.py # File indexer
โ โโโ parsers.py # Format parsers
โ โโโ results.py # Result formatting
โโโ ๐ ui/ # Console UI
โ โโโ colors.py # ANSI colors
โ โโโ display.py # Display utils
โ โโโ effects.py # Animations
โ โโโ menu.py # Menu system
โโโ ๐ utils/ # Utilities
โโโ external.py # URL opening
โโโ filesystem.py # File operations
โโโ platform.py # Platform detection
| Technique | Description | Benefit |
|---|---|---|
| ๐บ๏ธ mmap | Memory-mapped file I/O | Zero-copy reads for >10MB files |
| ๐งต ThreadPool | Parallel file processing | Nร speedup on multi-core |
| ๐ฆ LRU Cache | Result caching | Instant repeated queries |
| ๐ค casefold() | Optimized case folding | Faster than .lower() |
| โฑ๏ธ Early Exit | Max results limit | Stops at first N matches |
| ๐ Generators | Streaming iteration | Zero full-list allocation |
Edit dbsearcher/constants.py to customize:
# Performance tuning
MMAP_THRESHOLD_BYTES = 10 * 1024 * 1024 # Use mmap for files > 10MB
DEFAULT_PARALLEL_WORKERS = 4 # Number of parallel workers
MAX_RESULTS_DEFAULT = 10000 # Maximum results to return
# Supported file types
SUPPORTED_EXTENSIONS = (".csv", ".txt", ".sql")This project uses basedpyright at the strictest settings possible:
# Install basedpyright
pip install basedpyright
# Run type checker
basedpyright dbsearcher/
# Expected output:
# 0 errors, 0 warnings, 0 notes โ
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ๐ Python and โค๏ธ by Xsyncio