{"repo":"fsistemas/sql2json","free":true,"listed":false,"github":"https://github.com/fsistemas/sql2json","clone":"git clone https://github.com/fsistemas/sql2json.git","description":"Python CLI tool to run queries against sqltatabases and convert the results to json, csv, excel in the command line or python program. Easy to use for Humans, automations, LLMS/Agents","language":"Python","stars":55,"topics":["python","sql","query","json","tools","converter","sqlalchemy","mysql","database","excel"],"license":"MIT","category":"databases-storage","readme_excerpt":"sql2json Run SQL queries and get JSON (or CSV) on stdout — pipe it anywhere. sql2json connects to any SQLAlchemy-supported database, executes a query, and writes the results as JSON to standard output. No server, no framework, no boilerplate. The command commits by default, so writes persist: Pass --read-only to run a statement without persisting anything (safe for exploration and agents). Use cases - Scheduled reports : run a cron job that pulls yesterday's sales and posts the JSON to a dashboard (Geckoboard, Grafana, etc.) - Shell pipelines : pipe query results into jq , curl , or any CLI tool that speaks JSON - AI agent data retrieval : let an LLM agent query your database with a single subprocess call — see AGENTS.md - ETL glue : extract rows as JSON, transform with standard tools, load elsewhere - Monitoring & alerting : script threshold checks against live database metrics Install Published on PyPI: sql2json is a CLI tool, so the recommended way to install it is as an isolated tool that lives on your PATH without touching any project environment. The default command below also bundles the PostgreSQL and MySQL drivers so you can connect to those databases immediately: Both methods work on modern, externally-managed systems (Manjaro/Arch, Debian 12+, Ubuntu 23.04+, Homebrew Python on macOS), where a plain system-wide pip install is refused with error: externally-managed-environment (PEP 668). Quoting gotcha: in zsh and bash the square brackets are glob characters, so the ","default_branch":null,"files":null,"tree":[],"storefront":"/r/fsistemas","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fsistemas/sql2json/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}