{"id":37071852,"url":"https://github.com/chigwell/tailwind-sql","last_synced_at":"2026-01-14T08:26:16.552Z","repository":{"id":329763992,"uuid":"1120621773","full_name":"chigwell/tailwind-sql","owner":"chigwell","description":"A new package that allows users to write SQL queries using a simplified, Tailwind CSS-like syntax. It takes natural language or abbreviated input from the user and converts it into valid, structured S","archived":false,"fork":false,"pushed_at":"2025-12-21T15:51:51.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-23T05:43:50.174Z","etag":null,"topics":["analyst-friendly","code-generation","database-agnostic","developer-friendly","natural-language-processing","nl2sql","no-sql-expertise-required","query-builder","simplified-syntax","sql","syntactic-validation","tailwind-syntax","utility-first"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/tailwind-sql/","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/chigwell.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-21T15:51:42.000Z","updated_at":"2025-12-21T15:52:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/chigwell/tailwind-sql","commit_stats":null,"previous_names":["chigwell/tailwind-sql"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/chigwell/tailwind-sql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chigwell%2Ftailwind-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chigwell%2Ftailwind-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chigwell%2Ftailwind-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chigwell%2Ftailwind-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chigwell","download_url":"https://codeload.github.com/chigwell/tailwind-sql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chigwell%2Ftailwind-sql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:16:59.381Z","status":"ssl_error","status_checked_at":"2026-01-14T08:13:45.490Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["analyst-friendly","code-generation","database-agnostic","developer-friendly","natural-language-processing","nl2sql","no-sql-expertise-required","query-builder","simplified-syntax","sql","syntactic-validation","tailwind-syntax","utility-first"],"created_at":"2026-01-14T08:26:16.004Z","updated_at":"2026-01-14T08:26:16.530Z","avatar_url":"https://github.com/chigwell.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tailwind-SQL\n[![PyPI version](https://badge.fury.io/py/tailwind-sql.svg)](https://badge.fury.io/py/tailwind-sql)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Downloads](https://static.pepy.tech/badge/tailwind-sql)](https://pepy.tech/project/tailwind-sql)\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-blue)](https://www.linkedin.com/in/eugene-evstafev-716669181/)\n\n\n**Write SQL queries with Tailwind CSS-like simplicity**\n\nTailwind-SQL lets you generate SQL queries using a natural language or utility-first approach inspired by Tailwind CSS. Perfect for developers and analysts who want to write database queries intuitively without deep SQL expertise.\n\n---\n\n## 🚀 Features\n\n- **Utility-first SQL**: Write queries using a simplified, intuitive syntax\n- **LLM-powered**: Uses advanced language models to convert natural language into valid SQL\n- **Flexible**: Works with any LangChain-compatible LLM (default: [LLM7](https://token.llm7.io/))\n- **Type-safe**: Returns structured SQL output ready for execution\n\n---\n\n## 📦 Installation\n\n```bash\npip install tailwind_sql\n```\n\n---\n\n## 🔧 Usage\n\n### Basic Usage (with default LLM7)\n```python\nfrom tailwind_sql import tailwind_sql\n\n# Simple query generation\nresponse = tailwind_sql(\"Show me all users from New York with active status\")\nprint(response)\n```\n\n### Custom LLM Integration\n\nYou can use any LangChain-compatible LLM by passing it as the `llm` parameter:\n\n#### With OpenAI\n```python\nfrom langchain_openai import ChatOpenAI\nfrom tailwind_sql import tailwind_sql\n\nllm = ChatOpenAI()\nresponse = tailwind_sql(\"Select top 10 customers ordered by purchase amount\", llm=llm)\n```\n\n#### With Anthropic\n```python\nfrom langchain_anthropic import ChatAnthropic\nfrom tailwind_sql import tailwind_sql\n\nllm = ChatAnthropic()\nresponse = tailwind_sql(\"Find all inactive users from last quarter\", llm=llm)\n```\n\n#### With Google Generative AI\n```python\nfrom langchain_google_genai import ChatGoogleGenerativeAI\nfrom tailwind_sql import tailwind_sql\n\nllm = ChatGoogleGenerativeAI()\nresponse = tailwind_sql(\"Calculate monthly revenue by product category\", llm=llm)\n```\n\n---\n\n## 🔑 API Key Configuration\n\n### Default (LLM7)\n- Uses LLM7's free tier by default\n- API key can be set via environment variable:\n  ```bash\n  export LLM7_API_KEY=\"your_api_key\"\n  ```\n- Or passed directly:\n  ```python\n  from tailwind_sql import tailwind_sql\n  response = tailwind_sql(\"Query example\", api_key=\"your_api_key\")\n  ```\n\n### Custom LLM\nFor other LLMs, simply pass your configured LLM instance as shown in the examples above.\n\n---\n\n## 📝 Input Parameters\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `user_input` | `str` | The natural language or utility-style query input |\n| `llm` | `Optional[BaseChatModel]` | Custom LangChain LLM instance (optional) |\n| `api_key` | `Optional[str]` | LLM7 API key (optional, defaults to environment variable) |\n\n---\n\n## 📊 Example Queries\n\n### Natural Language Input\n```python\ntailwind_sql(\"Find all customers who made purchases over $1000 in 2023\")\n```\n\n### Utility-Style Input (Tailwind-like)\n```python\ntailwind_sql(\"select * from users where status='active' and location='New York' order by created_at desc limit 100\")\n```\n\n---\n\n## 🔄 Rate Limits\n\n- **LLM7 Free Tier**: Sufficient for most use cases\n- **Custom LLM**: No rate limits (depends on your provider)\n- **Upgrade**: For higher LLM7 limits, pass your own API key\n\n---\n\n## 📜 License\n\nMIT\n\n---\n\n## 📢 Support \u0026 Issues\n\nFor support or to report issues, please open a GitHub issue:\n[https://github.com/chigwell/tailwind-sql/issues](https://github.com/chigwell/tailwind-sql/issues)\n\n---\n\n## 👤 Author\n\n**Eugene Evstafev**\n📧 [hi@euegne.plus](mailto:hi@euegne.plus)\n🔗 [@chigwell](https://github.com/chigwell)\n\n---\n\n## 📚 Related Projects\n\n- [LLM7](https://token.llm7.io/) - Default LLM provider\n- [LangChain](https://langchain.com/) - Framework for LLM integration\n- [Tailwind CSS](https://tailwindcss.com/) - Inspiration for utility-first approach","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchigwell%2Ftailwind-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchigwell%2Ftailwind-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchigwell%2Ftailwind-sql/lists"}