{"id":25020862,"url":"https://github.com/abhigyan126/prompt2query","last_synced_at":"2026-02-13T22:11:57.773Z","repository":{"id":261638635,"uuid":"851047229","full_name":"Abhigyan126/Prompt2query","owner":"Abhigyan126","description":"A Python desktop application for streamlined data analysis, enabling users to generate and execute Pandas and SQL queries with ease. Focus on reducing analysis time through an intuitive interface and efficient workflows","archived":false,"fork":false,"pushed_at":"2025-01-22T17:21:27.000Z","size":9977,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-28T14:47:07.779Z","etag":null,"topics":["data-analysis","data-science","data-visualization","database","gemini","generative-ai","ide","llm","pandas","pandas-interface","python","sql-interface"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Abhigyan126.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-02T10:25:25.000Z","updated_at":"2025-01-22T17:21:31.000Z","dependencies_parsed_at":"2025-01-22T18:34:24.600Z","dependency_job_id":null,"html_url":"https://github.com/Abhigyan126/Prompt2query","commit_stats":null,"previous_names":["abhigyan126/prompt2query"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhigyan126%2FPrompt2query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhigyan126%2FPrompt2query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhigyan126%2FPrompt2query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhigyan126%2FPrompt2query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Abhigyan126","download_url":"https://codeload.github.com/Abhigyan126/Prompt2query/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhigyan126%2FPrompt2query/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259080921,"owners_count":22802393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-analysis","data-science","data-visualization","database","gemini","generative-ai","ide","llm","pandas","pandas-interface","python","sql-interface"],"created_at":"2025-02-05T12:18:02.213Z","updated_at":"2025-10-03T20:40:29.936Z","avatar_url":"https://github.com/Abhigyan126.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prompt2query\n\u003cimg width=\"1389\" alt=\"Screenshot 2024-10-02 at 7 39 21 PM\" src=\"https://github.com/user-attachments/assets/0184a896-f43e-4976-bfcf-8989b3d1948f\"\u003e\n# Prompt2Query\n\n**Prompt2Query** is a desktop application built using `tkinter` that enables users to input natural language prompts, generate corresponding code, and execute it using the `llm_pandas` library. This tool is specifically designed for interacting with data using Python code, providing an intuitive interface to query datasets with natural language.\n\n\n## Flow chart\n```mermaid\n%%{init: {'theme': 'black', 'themeVariables': { 'fontSize': '16px'}, \"securityLevel\": \"loose\"}}%%\ngraph TD\n    A[User Input] --\u003e B{Mode Selection}\n    \n    B --\u003e|Pandas| C[Pandas Mode]\n    C --\u003e C1[LLMHandler]\n    C1 --\u003e C2[Generate Code]\n    C2 --\u003e C3[Execute Code]\n    C3 --\u003e C4[Generate Natural Language]\n    C4 --\u003e R[Display Results]\n    \n    B --\u003e|SQL| D[SQL Mode]\n    D --\u003e D1[LLMMySQLHandler]\n    D1 --\u003e D2[Generate SQL]\n    D2 --\u003e D3[Execute SQL]\n    D3 --\u003e D4[Format Results]\n    D4 --\u003e R\n    \n    B --\u003e|REPandas| E[Recursive Mode]\n    E --\u003e E1[Generate Plan]\n    E1 --\u003e E2[Execute Phases]\n    E2 --\u003e E3{Phase Complete?}\n    E3 --\u003e|No| E2\n    E3 --\u003e|Yes| R\n    \n    B --\u003e|Default| F[Default Mode]\n    F --\u003e F1[LLM Processing]\n    F1 --\u003e R\n    \n    G[File Operations] --\u003e G1{Action Type}\n    G1 --\u003e|Load| G2[Load CSV]\n    G1 --\u003e|Save| G3[Save Results]\n    G2 --\u003e C1\n    G3 --\u003e H[File System]\n    \n    I[History Management] --\u003e I1[Track Selected Items]\n    I1 --\u003e I2[Update Context]\n    I2 --\u003e C1\n    I2 --\u003e D1\n```\n\n## Features\n\n- **Natural Language to Code**: Convert user queries written in natural language to executable code using `llm_pandas`.\n- **Multiple Modes**: Currently supports both Pandas and SQL modes for generating queries.\n- **File Attachment**: Load CSV files to query data.\n- **Code Execution**: Execute the generated code directly within the application.\n- **Scrollable Result Logs**: View query results and logs in a clean, organized, scrollable interface.\n- **Interactive Interface**: Buttons and dropdowns for a seamless user experience.\n- **Query History**: Track and review previous queries and their corresponding code and results.\n\n## Installation\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/Abhigyan126/Prompt2query.git\n    ```\n\n2. Navigate into the project directory:\n    ```bash\n    cd prompt2query\n    ```\n\n3. Install the required dependencies:\n    ```bash\n    pip install tkinter google-generativeai\n    ```\n\n4. Run the application:\n    ```bash\n    python Begin.py\n    ```\n\n## Usage\n\n- **Load a Dataset**: Use the \"Attachment\" button to upload a CSV file.\n- **Enter Query**: Type your query in the input box at the bottom right of the window.\n- **Execute**: Choose between Pandas or SQL mode from the dropdown, and click the \"Execute\" button to generate and run the corresponding code.\n- **View Results**: The generated code and results will appear in the respective panes on the left-hand side.\n- **Log**: All executed queries and results are logged for easy reference.\n\n## Dependencies\n\n- `tkinter`: For the graphical user interface.\n- `llm_pandas`: To handle natural language queries and generate code.\n- `datetime`: For timestamping query logs.\n\n## Project Structure\n\n```bash\n.\n├── Icons                  # Folder containing application icons\n├── Begin.py               # Main application script\n├── llm_pandas             # Library to generate code\n├── llm.py                 # Library to comunicate with LLM here in this cose gemini by google\n└── README.md              # Project documentation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhigyan126%2Fprompt2query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhigyan126%2Fprompt2query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhigyan126%2Fprompt2query/lists"}