Skip to main content

Terminal Query Search

This package lets you query filter files, folders or pipe outputs using SQL syntax

This uses python's sqlite3 module for querying

Table of Contents

Installation

pip install query-search

Learn by Example

cat file.txt | qq "where lower(line) like '%daniel%'"
# or
echo hello | qq "select line from logs"
# or
echo hello | qq path:/path/to/some.sql
# or
qq "where line like 'id: %'" /path/to/my.txt
# or 
qq "select 'Line: ' || i as line_index, line from logs where line like 'id: %'" /path/to/my.txt
# or 
qq path:/path/to/some.sql /path/to/my.txt
# or
qq --folder /path/to/folder "where line like '%important%'"
# or
qq --folder /path/to/folder path:/path/to/some.sql

Table Structure

CREATE TABLE logs (i int, line TEXT);

i Is the line index starting at 1.

line is the read stripped line (line.strip('\n'))

License

  • MIT License

Metadata

Release files for query-search 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for query-search 0.0.4
File Size Uploaded
query_search-0.0.4.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for query-search 0.0.4
File Interpreter ABI Platform
query_search-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 11.4 kB

Release files / query_search-0.0.4.tar.gz

Download URL query_search-0.0.4.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6d38123ded741f5eb77f6b2998f81e229223b60d7e584171849d0fcb09ffc1df
BLAKE2b-256 checksum
How to use checksums
620416aa480872928091f96f16aa435fd831f6d8813616b8dac91c8609c9ac05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.5

Release files / query_search-0.0.4-py3-none-any.whl

Download URL query_search-0.0.4-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64e62b68c17bca5133ec15d3402b14cfcedbf7a6a3b0166fdc41c2b5033acc17
BLAKE2b-256 checksum
How to use checksums
a601c7494dc97ff19fa2ba076b6f661ab018019c9e6f68705a620cd9b762b795
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.5
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page