[build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "schemagate" version = "0.1.58" description = "Identity-scoped schema selection for text-to-SQL: give the model only the tables this caller may read, and 75% fewer prompt tokens" readme = "README.md" license = "Apache-2.0" # Apache-2.0 section 4(d): a NOTICE file travels with every redistribution. license-files = ["LICENSE", "NOTICE"] requires-python = ">=3.9" authors = [{name = "Ashish Sinha"}] keywords = [ "nl2sql", "text-to-sql", "text2sql", "sql-generation", "llm", "rag", "schema-linking", "schema-selection", "schema-retrieval", "database", "vector-search", "bm25", "hybrid-search", "row-level-security", "rls", "vpd", "oracle", "oracle-23ai", "postgresql", "sql-server", "sqlalchemy", "mcp", "model-context-protocol", "langchain", "anthropic", "gemini", "openai", "ai-agent", "data-catalog", "prompt-engineering", ] classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Topic :: Database", "Topic :: Database :: Database Engines/Servers", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Security", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed", ] dependencies = ["SQLAlchemy>=2.0"] [project.optional-dependencies] # database drivers -- reflection itself works on any SQLAlchemy dialect oracle = ["oracledb>=2.4"] postgres = ["psycopg[binary]>=3.1"] mssql = ["pyodbc>=5.0"] mysql = ["PyMySQL>=1.1"] # every driver in one go, for people who do not want to pick. Kept out of the # base install on purpose: `pip install schemagate` stays one dependency, so # importing the library cannot fail because of a driver nobody is using. databases = ["oracledb>=2.4", "psycopg[binary]>=3.1", "pyodbc>=5.0", "PyMySQL>=1.1"] # optional AI cataloguing -- bring your own key; none of this is required anthropic = ["anthropic>=0.40"] openai = ["openai>=1.40"] gemini = ["google-genai>=1.0"] ai = ["anthropic>=0.40", "openai>=1.40", "google-genai>=1.0"] # small SDKs; oci is separate (big) oci = ["oci>=2.130"] huggingface = ["sentence-transformers>=3.0", "transformers>=4.40", "torch>=2.1"] # the everything-you-are-likely-to-want install: every database driver, the # model SDKs and MCP. Deliberately without `huggingface` (a torch download) and # `oci`, which is 488 MB and 17,505 modules on its own -- against 217 MB for # all of this put together. Adding it would make the default install eight # times heavier for a service most users never call, so it stays one word # away: `pip install "schemagate[all,oci]"`. all = ["oracledb>=2.4", "psycopg[binary]>=3.1", "pyodbc>=5.0", "PyMySQL>=1.1", "anthropic>=0.40", "openai>=1.40", "google-genai>=1.0", "mcp>=1.2; python_version >= '3.10'"] # integrations mcp = ["mcp>=1.2; python_version >= '3.10'"] langchain = ["langchain-core>=0.3"] dev = ["pytest>=8", "ruff", "mypy", "sqlglot>=25", "anyio>=4", "langchain-core>=0.3", # tests/test_oci_stack.py parses cloud-init.yaml; it was relying # on whatever the runner happened to have installed. "pyyaml>=6", # these two need 3.10+; on 3.9 their tests skip "mcp>=1.2; python_version >= '3.10'", "hypothesis>=6; python_version >= '3.10'"] [project.scripts] schemagate = "schemagate.cli:main" [project.urls] Homepage = "https://github.com/ashishsinha1602/schemagate" Repository = "https://github.com/ashishsinha1602/schemagate" Issues = "https://github.com/ashishsinha1602/schemagate/issues" Changelog = "https://github.com/ashishsinha1602/schemagate/blob/main/CHANGELOG.md" [tool.hatch.build.targets.wheel] packages = ["src/schemagate"] [tool.hatch.build] include = ["src/schemagate/**/*.py", "src/schemagate/py.typed", "src/schemagate/studio.html"] [tool.hatch.build.targets.sdist] exclude = ["docs/media", "shim", "studio/node_modules", ".github"] [tool.pytest.ini_options] markers = [ "live: needs real credentials and network (provider keys, OCI config, a database); skipped otherwise", ] [tool.mypy] # Not a CI gate; run it locally with `mypy src/schemagate`. [[tool.mypy.overrides]] # The OCI SDK is an optional extra and resolves here as an empty namespace # package, so every `oci.generative_ai_inference...` reads as an attribute # error on a module that has no attributes. Skipping it is honest -- there is # nothing to check against -- and beats scattering `type: ignore` through code # that a live Autonomous Database has already proven works. module = ["oci", "oci.*"] ignore_missing_imports = true follow_imports = "skip"