nl2sql-engine 0.1.2__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nl2sql_engine-0.2.1/LICENSE +21 -0
- nl2sql_engine-0.2.1/PKG-INFO +226 -0
- nl2sql_engine-0.2.1/README.md +147 -0
- nl2sql_engine-0.2.1/THIRD_PARTY_NOTICES.md +249 -0
- nl2sql_engine-0.2.1/pyproject.toml +125 -0
- nl2sql_engine-0.2.1/src/nl2sql/__init__.py +62 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/adapters/mssql/adapter.py +2 -2
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/adapters/postgres/adapter.py +5 -3
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/adapters/sqlalchemy_base/__init__.py +0 -4
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/adapters/sqlalchemy_base/adapter.py +11 -6
- nl2sql_engine-0.2.1/src/nl2sql/adapters/sqlalchemy_base/models.py +23 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/adapters/sqlite/adapter.py +48 -1
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/aggregation/aggregator.py +3 -6
- nl2sql_engine-0.2.1/src/nl2sql/aggregation/columns.py +110 -0
- nl2sql_engine-0.2.1/src/nl2sql/aggregation/engines/polars_duckdb.py +158 -0
- nl2sql_engine-0.2.1/src/nl2sql/api/benchmark_api.py +154 -0
- nl2sql_engine-0.2.1/src/nl2sql/api/query_api.py +271 -0
- nl2sql_engine-0.2.1/src/nl2sql/auth/rbac.py +38 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/commands/benchmark.py +316 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/commands/cache.py +32 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/commands/demo.py +533 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/commands/doctor.py +134 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/commands/feedback.py +145 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/commands/indexing.py +5 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/commands/info.py +8 -1
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/commands/run.py +24 -7
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/commands/setup.py +77 -55
- nl2sql_engine-0.2.1/src/nl2sql/cli/commands/trace.py +170 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/common/indexing.py +121 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/console.py +1 -1
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/chinook.py +57 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/datasets.py +110 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/defaults.py +11 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/llm_config.py +98 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/manager.py +204 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/__init__.py +1 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/app.py +622 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/assets/clips/ask-dark.jpg +0 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/assets/clips/ask-dark.webm +0 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/assets/clips/ask.jpg +0 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/assets/clips/ask.webm +0 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/assets/clips/pipeline-dark.jpg +0 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/assets/clips/pipeline-dark.webm +0 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/assets/clips/pipeline.jpg +0 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/assets/clips/pipeline.webm +0 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/assets/clips/retrieval-dark.jpg +0 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/assets/clips/retrieval-dark.webm +0 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/assets/clips/retrieval.jpg +0 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/assets/clips/retrieval.webm +0 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/assets/social-card.png +0 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/hosted.py +443 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/index_panel.py +133 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/preview.py +101 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/settings.py +399 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/playground/static/index.html +68 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/recordings/chinook.json +3817 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/stamp.py +66 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/support.py +45 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/demo/webanalytics.py +41 -0
- nl2sql_engine-0.2.1/src/nl2sql/cli/generators/env/templates.py +42 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/generators/llm/generator.py +13 -2
- nl2sql_engine-0.2.1/src/nl2sql/cli/main.py +446 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/reporting.py +152 -332
- nl2sql_engine-0.2.1/src/nl2sql/common/env_hint.py +32 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/common/errors.py +28 -15
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/common/metrics.py +10 -5
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/common/settings.py +106 -14
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/configs/llm.py +23 -3
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/configs/manager.py +19 -8
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/context.py +23 -2
- nl2sql_engine-0.2.1/src/nl2sql/datasets/README.md +108 -0
- nl2sql_engine-0.2.1/src/nl2sql/datasets/__init__.py +21 -0
- nl2sql_engine-0.2.1/src/nl2sql/datasets/chinook.sqlite +0 -0
- nl2sql_engine-0.2.1/src/nl2sql/datasets/support.sqlite +0 -0
- nl2sql_engine-0.2.1/src/nl2sql/datasets/webanalytics.sqlite +0 -0
- nl2sql_engine-0.2.1/src/nl2sql/datasources/models.py +39 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/datasources/registry.py +31 -12
- nl2sql_engine-0.2.1/src/nl2sql/evaluation/benchmark_runner.py +122 -0
- nl2sql_engine-0.2.1/src/nl2sql/evaluation/datasets/chinook_gold.yaml +1079 -0
- nl2sql_engine-0.2.1/src/nl2sql/evaluation/datasets/chinook_gold_plans.yaml +745 -0
- nl2sql_engine-0.2.1/src/nl2sql/evaluation/evaluator.py +335 -0
- nl2sql_engine-0.2.1/src/nl2sql/evaluation/faithfulness.py +134 -0
- nl2sql_engine-0.2.1/src/nl2sql/evaluation/gold.py +148 -0
- nl2sql_engine-0.2.1/src/nl2sql/evaluation/presets/__init__.py +79 -0
- nl2sql_engine-0.2.1/src/nl2sql/evaluation/presets/claude-planner.yaml +20 -0
- nl2sql_engine-0.2.1/src/nl2sql/evaluation/presets/gpt-5.4-mini-helpers.yaml +19 -0
- nl2sql_engine-0.2.1/src/nl2sql/evaluation/presets/gpt-5.4.yaml +10 -0
- nl2sql_engine-0.2.1/src/nl2sql/evaluation/prices.py +53 -0
- nl2sql_engine-0.2.1/src/nl2sql/evaluation/records.py +613 -0
- nl2sql_engine-0.2.1/src/nl2sql/evaluation/retrieval_recall.py +174 -0
- nl2sql_engine-0.2.1/src/nl2sql/evaluation/tier1.py +140 -0
- nl2sql_engine-0.2.1/src/nl2sql/evaluation/tier2.py +519 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/evaluation/types.py +10 -4
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/execution/artifacts/store.py +5 -4
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/nodes/global_planner/schemas.py → nl2sql_engine-0.2.1/src/nl2sql/execution/dag.py +4 -24
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/execution/executor/sql_executor.py +1 -2
- nl2sql_engine-0.2.1/src/nl2sql/feedback/__init__.py +16 -0
- nl2sql_engine-0.2.1/src/nl2sql/feedback/drafts.py +65 -0
- nl2sql_engine-0.2.1/src/nl2sql/feedback/record.py +90 -0
- nl2sql_engine-0.2.1/src/nl2sql/feedback/stats.py +83 -0
- nl2sql_engine-0.2.1/src/nl2sql/feedback/store.py +112 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/indexing/embeddings.py +12 -3
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/indexing/enrichment_service.py +2 -3
- nl2sql_engine-0.2.1/src/nl2sql/indexing/health.py +207 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/indexing/orchestrator.py +30 -8
- nl2sql_engine-0.2.1/src/nl2sql/indexing/rebuild.py +144 -0
- nl2sql_engine-0.2.1/src/nl2sql/indexing/retrieval_trace.py +144 -0
- nl2sql_engine-0.2.1/src/nl2sql/indexing/vector_store.py +659 -0
- nl2sql_engine-0.2.1/src/nl2sql/llm/failures.py +185 -0
- nl2sql_engine-0.2.1/src/nl2sql/llm/providers.py +183 -0
- nl2sql_engine-0.2.1/src/nl2sql/llm/registry.py +345 -0
- nl2sql_engine-0.2.1/src/nl2sql/llm/replay.py +290 -0
- nl2sql_engine-0.2.1/src/nl2sql/llm/request_key.py +182 -0
- nl2sql_engine-0.2.1/src/nl2sql/llm/wires/__init__.py +33 -0
- nl2sql_engine-0.2.1/src/nl2sql/llm/wires/anthropic.py +133 -0
- nl2sql_engine-0.2.1/src/nl2sql/llm/wires/anthropic_client.py +63 -0
- nl2sql_engine-0.2.1/src/nl2sql/llm/wires/base.py +87 -0
- nl2sql_engine-0.2.1/src/nl2sql/llm/wires/openai.py +119 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/graph.py +6 -8
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/graph_utils.py +198 -0
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/nodes/__init__.py +10 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/aggregator/node.py +2 -7
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/nodes/aggregator/schemas.py +9 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/answer_synthesizer/node.py +4 -4
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/nodes/ast_planner/__init__.py +9 -0
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/nodes/ast_planner/functions.py +68 -0
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/nodes/ast_planner/node.py +171 -0
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/nodes/ast_planner/prompts.py +206 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/ast_planner/schemas.py +16 -13
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/nodes/datasource_resolver/node.py +351 -0
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/nodes/datasource_resolver/prompts.py +26 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/datasource_resolver/schemas.py +10 -0
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/nodes/decomposer/dag.py +121 -0
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/nodes/decomposer/node.py +372 -0
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/nodes/decomposer/prompts.py +110 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/decomposer/schemas.py +59 -30
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/executor/node.py +3 -13
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/nodes/generator/node.py +490 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/refiner/node.py +8 -17
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/refiner/prompts.py +21 -12
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/schema_retriever/node.py +114 -9
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/nodes/schema_retriever/schema.py +69 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/validator/node.py +347 -168
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/nodes/validator/schemas.py +26 -0
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/plan_cache.py +112 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/routes.py +29 -21
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/runtime.py +289 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/state.py +3 -3
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/steps.py +130 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/subgraphs/schemas.py +5 -1
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/subgraphs/sql_agent.py +31 -21
- nl2sql_engine-0.2.1/src/nl2sql/pipeline/timing.py +52 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/public_api.py +111 -5
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/schema/in_memory_store.py +16 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/schema/protocol.py +16 -1
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/schema/sqlite_store.py +105 -4
- nl2sql_engine-0.2.1/src/nl2sql/schema/view.py +56 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/secrets/factory.py +4 -3
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/secrets/manager.py +15 -2
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/services/callbacks/monitor.py +10 -11
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/services/callbacks/node_handlers.py +1 -2
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/services/callbacks/node_metrics.py +0 -3
- nl2sql_engine-0.2.1/src/nl2sql/services/callbacks/token_handler.py +263 -0
- nl2sql_engine-0.2.1/src/nl2sql/testing/fake_llm.py +242 -0
- nl2sql_engine-0.2.1/src/nl2sql/tracing/__init__.py +7 -0
- nl2sql_engine-0.2.1/src/nl2sql/tracing/document.py +212 -0
- nl2sql_engine-0.2.1/src/nl2sql/tracing/recorder.py +376 -0
- nl2sql_engine-0.2.1/src/nl2sql/tracing/replay.py +318 -0
- nl2sql_engine-0.2.1/src/nl2sql/tracing/trace.py +173 -0
- nl2sql_engine-0.2.1/src/nl2sql_engine.egg-info/PKG-INFO +226 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql_engine.egg-info/SOURCES.txt +86 -12
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql_engine.egg-info/requires.txt +11 -2
- nl2sql_engine-0.1.2/PKG-INFO +0 -295
- nl2sql_engine-0.1.2/README.md +0 -241
- nl2sql_engine-0.1.2/pyproject.toml +0 -76
- nl2sql_engine-0.1.2/src/nl2sql/__init__.py +0 -38
- nl2sql_engine-0.1.2/src/nl2sql/adapters/sqlalchemy_base/models.py +0 -36
- nl2sql_engine-0.1.2/src/nl2sql/aggregation/engines/polars_duckdb.py +0 -125
- nl2sql_engine-0.1.2/src/nl2sql/api/benchmark_api.py +0 -114
- nl2sql_engine-0.1.2/src/nl2sql/api/query_api.py +0 -138
- nl2sql_engine-0.1.2/src/nl2sql/api/result_api.py +0 -24
- nl2sql_engine-0.1.2/src/nl2sql/auth/rbac.py +0 -25
- nl2sql_engine-0.1.2/src/nl2sql/cli/commands/benchmark.py +0 -34
- nl2sql_engine-0.1.2/src/nl2sql/cli/commands/doctor.py +0 -49
- nl2sql_engine-0.1.2/src/nl2sql/cli/commands/indexing.py +0 -126
- nl2sql_engine-0.1.2/src/nl2sql/cli/common/prompts.py +0 -53
- nl2sql_engine-0.1.2/src/nl2sql/cli/demo/data.py +0 -87
- nl2sql_engine-0.1.2/src/nl2sql/cli/demo/defaults.py +0 -126
- nl2sql_engine-0.1.2/src/nl2sql/cli/demo/factory.py +0 -289
- nl2sql_engine-0.1.2/src/nl2sql/cli/demo/manager.py +0 -230
- nl2sql_engine-0.1.2/src/nl2sql/cli/demo/schemas.py +0 -348
- nl2sql_engine-0.1.2/src/nl2sql/cli/demo/writers/docker.py +0 -194
- nl2sql_engine-0.1.2/src/nl2sql/cli/demo/writers/sqlite.py +0 -88
- nl2sql_engine-0.1.2/src/nl2sql/cli/generators/env/templates.py +0 -25
- nl2sql_engine-0.1.2/src/nl2sql/cli/main.py +0 -195
- nl2sql_engine-0.1.2/src/nl2sql/datasources/models.py +0 -21
- nl2sql_engine-0.1.2/src/nl2sql/evaluation/benchmark_runner.py +0 -320
- nl2sql_engine-0.1.2/src/nl2sql/evaluation/evaluator.py +0 -134
- nl2sql_engine-0.1.2/src/nl2sql/indexing/vector_store.py +0 -422
- nl2sql_engine-0.1.2/src/nl2sql/llm/registry.py +0 -214
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/graph_utils.py +0 -141
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/nodes/__init__.py +0 -25
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/nodes/aggregator/prompts.py +0 -20
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/nodes/aggregator/schemas.py +0 -28
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/nodes/ast_planner/__init__.py +0 -4
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/nodes/ast_planner/node.py +0 -104
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/nodes/ast_planner/prompts.py +0 -138
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/nodes/datasource_resolver/node.py +0 -253
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/nodes/decomposer/node.py +0 -219
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/nodes/decomposer/prompts.py +0 -96
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/nodes/generator/node.py +0 -267
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/nodes/global_planner/__init__.py +0 -4
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/nodes/global_planner/node.py +0 -186
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/nodes/schema_retriever/schema.py +0 -27
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/nodes/validator/schemas.py +0 -12
- nl2sql_engine-0.1.2/src/nl2sql/pipeline/runtime.py +0 -159
- nl2sql_engine-0.1.2/src/nl2sql/services/callbacks/token_handler.py +0 -56
- nl2sql_engine-0.1.2/src/nl2sql_engine.egg-info/PKG-INFO +0 -295
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/setup.cfg +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/adapters/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/adapters/duckdb/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/adapters/duckdb/adapter.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/adapters/mssql/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/adapters/mysql/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/adapters/mysql/adapter.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/adapters/postgres/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/adapters/sqlite/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/aggregation/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/aggregation/engines/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/api/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/api/auth_api.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/api/datasource_api.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/api/indexing_api.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/api/llm_api.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/api/policy_api.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/api/settings_api.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/auth/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/auth/models.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/checks.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/commands/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/commands/install.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/commands/policy.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/commands/visualize.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/common/decorators.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/config.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/demo/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/generators/datasources/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/generators/datasources/generator.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/generators/datasources/templates.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/generators/env/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/generators/env/generator.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/generators/llm/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/generators/llm/templates.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/generators/policies/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/generators/policies/generator.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/generators/policies/templates.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/cli/types.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/common/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/common/cancellation.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/common/context.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/common/event_logger.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/common/exceptions.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/common/logger.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/common/resilience.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/configs/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/configs/datasources.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/configs/policies.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/configs/sample_questions.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/configs/secrets.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/datasources/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/datasources/discovery.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/datasources/protocols.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/evaluation/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/execution/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/execution/artifacts/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/execution/artifacts/parquet.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/execution/contracts.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/execution/execution_store.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/execution/executor/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/indexing/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/indexing/chunk_builder.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/indexing/models.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/llm/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/llm/models.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/aggregator/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/answer_synthesizer/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/answer_synthesizer/prompts.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/answer_synthesizer/schemas.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/datasource_resolver/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/decomposer/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/executor/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/generator/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/generator/schemas.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/refiner/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/refiner/schemas.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/schema_retriever/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/nodes/validator/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/pipeline_runner.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/pipeline/subgraphs/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/schema/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/schema/store.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/secrets/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/secrets/interfaces.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/secrets/models.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/secrets/providers/aws.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/secrets/providers/azure.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/secrets/providers/env.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/secrets/providers/hashi.py +0 -0
- {nl2sql_engine-0.1.2/src/nl2sql/cli/demo/writers → nl2sql_engine-0.2.1/src/nl2sql/services}/__init__.py +0 -0
- {nl2sql_engine-0.1.2/src/nl2sql/services → nl2sql_engine-0.2.1/src/nl2sql/services/callbacks}/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/services/callbacks/node_context.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql/services/callbacks/presenter.py +0 -0
- {nl2sql_engine-0.1.2/src/nl2sql/services/callbacks → nl2sql_engine-0.2.1/src/nl2sql/testing}/__init__.py +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql_engine.egg-info/dependency_links.txt +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql_engine.egg-info/entry_points.txt +0 -0
- {nl2sql_engine-0.1.2 → nl2sql_engine-0.2.1}/src/nl2sql_engine.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 The NL2SQL Platform Authors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nl2sql-engine
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Ask a database questions in English: the model writes a typed query plan, never SQL, and the plan is checked against the schema and the caller's role before any SQL is generated
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Homepage, https://github.com/nadeem4/nl2sql
|
|
7
|
+
Project-URL: Documentation, https://nadeem4.github.io/nl2sql/
|
|
8
|
+
Project-URL: Source, https://github.com/nadeem4/nl2sql
|
|
9
|
+
Project-URL: Issues, https://github.com/nadeem4/nl2sql/issues
|
|
10
|
+
Project-URL: Demo, https://nadeem4nk-nl2sql-demo.hf.space
|
|
11
|
+
Keywords: nl2sql,text-to-sql,natural language,sql,llm,langgraph,sqlglot,database
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Database
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
20
|
+
Requires-Python: >=3.12
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
License-File: THIRD_PARTY_NOTICES.md
|
|
24
|
+
Requires-Dist: SQLAlchemy>=2.0
|
|
25
|
+
Requires-Dist: PyYAML>=6.0
|
|
26
|
+
Requires-Dist: langgraph<2,>=1.2
|
|
27
|
+
Requires-Dist: langchain>=0.2.0
|
|
28
|
+
Requires-Dist: langchain-core<2,>=1.6
|
|
29
|
+
Requires-Dist: langchain-chroma<2,>=1.1
|
|
30
|
+
Requires-Dist: langchain-openai<2,>=1.6
|
|
31
|
+
Requires-Dist: chromadb<2,>=1.5
|
|
32
|
+
Requires-Dist: nl2sql-adapter-sdk~=0.1
|
|
33
|
+
Requires-Dist: pydantic>=2.0
|
|
34
|
+
Requires-Dist: opentelemetry-api>=1.20.0
|
|
35
|
+
Requires-Dist: opentelemetry-sdk>=1.20.0
|
|
36
|
+
Requires-Dist: opentelemetry-exporter-otlp>=1.20.0
|
|
37
|
+
Requires-Dist: sqlglot>=23.0.0
|
|
38
|
+
Requires-Dist: pydantic-settings>=2.0.0
|
|
39
|
+
Requires-Dist: pyarrow>=14.0.0
|
|
40
|
+
Requires-Dist: pybreaker>=1.3.0
|
|
41
|
+
Requires-Dist: polars>=1.44
|
|
42
|
+
Requires-Dist: duckdb>=1.5
|
|
43
|
+
Requires-Dist: rich>=13.0.0
|
|
44
|
+
Requires-Dist: typer>=0.9.0
|
|
45
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
46
|
+
Requires-Dist: inquirerpy>=0.3.4
|
|
47
|
+
Requires-Dist: typing_extensions>=4.0
|
|
48
|
+
Requires-Dist: httpx<1,>=0.23
|
|
49
|
+
Provides-Extra: anthropic
|
|
50
|
+
Requires-Dist: langchain-anthropic<2,>=1.7; extra == "anthropic"
|
|
51
|
+
Provides-Extra: aws
|
|
52
|
+
Requires-Dist: boto3; extra == "aws"
|
|
53
|
+
Provides-Extra: azure
|
|
54
|
+
Requires-Dist: azure-identity; extra == "azure"
|
|
55
|
+
Requires-Dist: azure-keyvault-secrets; extra == "azure"
|
|
56
|
+
Provides-Extra: demo
|
|
57
|
+
Requires-Dist: fastapi>=0.100.0; extra == "demo"
|
|
58
|
+
Requires-Dist: uvicorn>=0.20.0; extra == "demo"
|
|
59
|
+
Provides-Extra: duckdb
|
|
60
|
+
Requires-Dist: duckdb; extra == "duckdb"
|
|
61
|
+
Requires-Dist: duckdb-engine; extra == "duckdb"
|
|
62
|
+
Provides-Extra: hashicorp
|
|
63
|
+
Requires-Dist: hvac; extra == "hashicorp"
|
|
64
|
+
Provides-Extra: mssql
|
|
65
|
+
Requires-Dist: pyodbc>=4.0.0; extra == "mssql"
|
|
66
|
+
Requires-Dist: pymssql>=2.2.0; platform_system == "Linux" and extra == "mssql"
|
|
67
|
+
Provides-Extra: mysql
|
|
68
|
+
Requires-Dist: pymysql>=1.1.0; extra == "mysql"
|
|
69
|
+
Provides-Extra: postgres
|
|
70
|
+
Requires-Dist: psycopg2-binary>=2.9; extra == "postgres"
|
|
71
|
+
Provides-Extra: all
|
|
72
|
+
Requires-Dist: duckdb; extra == "all"
|
|
73
|
+
Requires-Dist: duckdb-engine; extra == "all"
|
|
74
|
+
Requires-Dist: pyodbc>=4.0.0; extra == "all"
|
|
75
|
+
Requires-Dist: pymssql>=2.2.0; platform_system == "Linux" and extra == "all"
|
|
76
|
+
Requires-Dist: pymysql>=1.1.0; extra == "all"
|
|
77
|
+
Requires-Dist: psycopg2-binary>=2.9; extra == "all"
|
|
78
|
+
Dynamic: license-file
|
|
79
|
+
|
|
80
|
+
# nl2sql-engine
|
|
81
|
+
|
|
82
|
+
Ask a database questions in English. The model writes a typed query plan, never
|
|
83
|
+
SQL text; the plan is checked against the real schema and the caller's role
|
|
84
|
+
before any SQL is generated.
|
|
85
|
+
|
|
86
|
+
This distribution is the engine: the LangGraph pipeline, the `nl2sql` CLI with
|
|
87
|
+
its browser playground, and the database adapters (PostgreSQL, MySQL, SQL
|
|
88
|
+
Server, SQLite, DuckDB). The REST server is the separate `nl2sql-api` package.
|
|
89
|
+
Full README and docs: <https://github.com/nadeem4/nl2sql>.
|
|
90
|
+
|
|
91
|
+
## Try it in your browser
|
|
92
|
+
|
|
93
|
+
**<https://nadeem4nk-nl2sql-demo.hf.space>** — the playground on three sample
|
|
94
|
+
databases, nothing to install.
|
|
95
|
+
|
|
96
|
+
[](https://nadeem4nk-nl2sql-demo.hf.space)
|
|
97
|
+
|
|
98
|
+
The server holds no API key: you paste your own into the page, one per
|
|
99
|
+
provider, and it stays in that browser tab, is used in memory for the question
|
|
100
|
+
that needs it, and is never stored, logged or traced. Settings also puts each
|
|
101
|
+
of the five model-using steps on a provider and model of its own.
|
|
102
|
+
|
|
103
|
+

|
|
104
|
+
|
|
105
|
+
## How it works
|
|
106
|
+
|
|
107
|
+
- The question is checked for answerability and routed to one of the registered
|
|
108
|
+
databases, then split into sub-queries, and each gets the part of the schema
|
|
109
|
+
it needs.
|
|
110
|
+
- The model returns a typed plan (a Pydantic `PlanModel`), never SQL. It may
|
|
111
|
+
only name a function from an allow-list, and date work is written portably
|
|
112
|
+
and rendered by each adapter in its own dialect.
|
|
113
|
+
- The logical validator checks every table and column against the schema,
|
|
114
|
+
joins against the declared foreign keys, and every table against the caller's
|
|
115
|
+
role (RBAC); it also builds the query tree the generator would build, so an
|
|
116
|
+
unjoinable plan is caught while the planner can still be asked to fix it. A
|
|
117
|
+
refused plan never becomes SQL.
|
|
118
|
+
- Only a plan that passes is rendered to SQL, deterministically, with `sqlglot`,
|
|
119
|
+
then executed and summarised.
|
|
120
|
+
|
|
121
|
+
The whole pipeline is 13 steps, five of them decided by a model; the
|
|
122
|
+
playground's Pipeline page lists them.
|
|
123
|
+
|
|
124
|
+
## Quickstart
|
|
125
|
+
|
|
126
|
+
Requires Python 3.12 or newer.
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
pip install "nl2sql-engine[demo]"
|
|
130
|
+
nl2sql demo
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
That writes a demo project into `./nl2sql-demo`, copies in three SQLite
|
|
134
|
+
databases -- [Chinook](https://github.com/nadeem4/nl2sql/blob/main/THIRD_PARTY_NOTICES.md),
|
|
135
|
+
`support` and `webanalytics` -- indexes their schemas locally (no key; the
|
|
136
|
+
first run downloads a ~79 MB ONNX embedding model) and opens the playground on
|
|
137
|
+
<http://127.0.0.1:8765/>.
|
|
138
|
+
|
|
139
|
+
**Answering a question needs a model:** `--api-key`, or `OPENAI_API_KEY`,
|
|
140
|
+
`OPENROUTER_API_KEY` or `ANTHROPIC_API_KEY` in the environment (Claude needs
|
|
141
|
+
`pip install "nl2sql-engine[demo,anthropic]"`), a key pasted into the
|
|
142
|
+
playground's Settings page, or a reachable Ollama. Without one the demo runs
|
|
143
|
+
in replay mode, which has no recorded answers out of the box, so it can show the
|
|
144
|
+
schema and the index but answers nothing. `nl2sql demo --record` (with an
|
|
145
|
+
OpenAI, OpenRouter or Anthropic key) records the guided questions for later key-free runs.
|
|
146
|
+
|
|
147
|
+
`nl2sql demo --hosted` runs the public variant above yourself: the server holds
|
|
148
|
+
no API key, each visitor pastes their own into the page for that question only
|
|
149
|
+
(without one, the guided questions replay recorded runs),
|
|
150
|
+
the sample databases are opened read-only, questions are rate limited per
|
|
151
|
+
visitor and capped per session, and Settings, Rebuild, ratings and `--record`
|
|
152
|
+
are refused. See
|
|
153
|
+
[Hosted demo](https://github.com/nadeem4/nl2sql/blob/main/docs/deployment/hosted-demo.md)
|
|
154
|
+
in the full docs.
|
|
155
|
+
|
|
156
|
+
The playground shows each answer's plan, validation checks, SQL, rows and cost,
|
|
157
|
+
a per-node Debug view, a Pipeline page listing every step of a run with the
|
|
158
|
+
model each used, a Retrieval inspector over the live index, and a right/wrong
|
|
159
|
+
rating per answer that `nl2sql feedback stats` reports on.
|
|
160
|
+
|
|
161
|
+
## CLI
|
|
162
|
+
|
|
163
|
+
From the demo folder (`cd nl2sql-demo`):
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
nl2sql --env demo run "How many customers do we have, by country?"
|
|
167
|
+
nl2sql --env demo run --role viewer "Who are the top 5 customers by total spend?" # refused
|
|
168
|
+
nl2sql --env demo run --no-exec "Which artist has the most albums?" # plan only
|
|
169
|
+
nl2sql --env demo index # re-index the schema
|
|
170
|
+
nl2sql --env demo doctor # check drivers, connectivity, key and index
|
|
171
|
+
nl2sql --env demo benchmark --tier 1 # gold plans, no key
|
|
172
|
+
nl2sql --env demo benchmark --tier 2 --model gpt-5.4 --max-cost 5
|
|
173
|
+
nl2sql --env demo benchmark retrieval # retrieval recall, no key
|
|
174
|
+
nl2sql --env demo feedback stats # ratings and guardrail rates
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Every command: [CLI reference](https://github.com/nadeem4/nl2sql#cli-reference).
|
|
178
|
+
|
|
179
|
+
## Python
|
|
180
|
+
|
|
181
|
+
```python
|
|
182
|
+
from nl2sql import NL2SQL, UserContext
|
|
183
|
+
|
|
184
|
+
engine = NL2SQL(env="demo") # loads .env.demo from the working directory
|
|
185
|
+
result = engine.run_query(
|
|
186
|
+
"How many customers are there?",
|
|
187
|
+
user_context=UserContext(roles=["admin"]),
|
|
188
|
+
)
|
|
189
|
+
for sq in result.sub_queries:
|
|
190
|
+
print(sq.sql, [c.name for c in sq.validation if c.passed])
|
|
191
|
+
print(result.final_answer["summary"] if result.final_answer else result.errors)
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Pass a `user_context` with a role: with none, `run_query` currently raises a
|
|
195
|
+
validation error, and an unknown role is refused.
|
|
196
|
+
|
|
197
|
+
## Install extras
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
pip install "nl2sql-engine[postgres]" # or [mysql], [mssql], [duckdb]
|
|
201
|
+
pip install "nl2sql-engine[all]" # every database driver; not [demo] or [anthropic]
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
SQLite needs no extra.
|
|
205
|
+
|
|
206
|
+
## Security
|
|
207
|
+
|
|
208
|
+
- The LLM provider receives the question, the schema the planner needs, sample
|
|
209
|
+
column values of tables the role may read, and the result rows (for the
|
|
210
|
+
written answer).
|
|
211
|
+
- RBAC is a per-role table allowlist; a plan touching a forbidden table is
|
|
212
|
+
refused. No column masking or row-level security.
|
|
213
|
+
- Read-only is not checked by the executor: only SELECTs are generated, and a
|
|
214
|
+
SQLite datasource can be opened read-only with `options.read_only: true` (the
|
|
215
|
+
three sample databases are), but no other dialect is. Give the engine a
|
|
216
|
+
read-only database user.
|
|
217
|
+
- No authentication: the caller supplies the role.
|
|
218
|
+
- No cross-database questions and no conversation yet: each sub-query is
|
|
219
|
+
planned against one datasource, and each question is answered on its own.
|
|
220
|
+
|
|
221
|
+
## Status
|
|
222
|
+
|
|
223
|
+
0.1.x. `nl2sql-adapter-sdk`, `nl2sql-engine` and `nl2sql-api` share one version
|
|
224
|
+
and are released together. Known limitations, benchmark results and the
|
|
225
|
+
roadmap: <https://github.com/nadeem4/nl2sql#project-status-limitations-and-roadmap>.
|
|
226
|
+
MIT licensed.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# nl2sql-engine
|
|
2
|
+
|
|
3
|
+
Ask a database questions in English. The model writes a typed query plan, never
|
|
4
|
+
SQL text; the plan is checked against the real schema and the caller's role
|
|
5
|
+
before any SQL is generated.
|
|
6
|
+
|
|
7
|
+
This distribution is the engine: the LangGraph pipeline, the `nl2sql` CLI with
|
|
8
|
+
its browser playground, and the database adapters (PostgreSQL, MySQL, SQL
|
|
9
|
+
Server, SQLite, DuckDB). The REST server is the separate `nl2sql-api` package.
|
|
10
|
+
Full README and docs: <https://github.com/nadeem4/nl2sql>.
|
|
11
|
+
|
|
12
|
+
## Try it in your browser
|
|
13
|
+
|
|
14
|
+
**<https://nadeem4nk-nl2sql-demo.hf.space>** — the playground on three sample
|
|
15
|
+
databases, nothing to install.
|
|
16
|
+
|
|
17
|
+
[](https://nadeem4nk-nl2sql-demo.hf.space)
|
|
18
|
+
|
|
19
|
+
The server holds no API key: you paste your own into the page, one per
|
|
20
|
+
provider, and it stays in that browser tab, is used in memory for the question
|
|
21
|
+
that needs it, and is never stored, logged or traced. Settings also puts each
|
|
22
|
+
of the five model-using steps on a provider and model of its own.
|
|
23
|
+
|
|
24
|
+

|
|
25
|
+
|
|
26
|
+
## How it works
|
|
27
|
+
|
|
28
|
+
- The question is checked for answerability and routed to one of the registered
|
|
29
|
+
databases, then split into sub-queries, and each gets the part of the schema
|
|
30
|
+
it needs.
|
|
31
|
+
- The model returns a typed plan (a Pydantic `PlanModel`), never SQL. It may
|
|
32
|
+
only name a function from an allow-list, and date work is written portably
|
|
33
|
+
and rendered by each adapter in its own dialect.
|
|
34
|
+
- The logical validator checks every table and column against the schema,
|
|
35
|
+
joins against the declared foreign keys, and every table against the caller's
|
|
36
|
+
role (RBAC); it also builds the query tree the generator would build, so an
|
|
37
|
+
unjoinable plan is caught while the planner can still be asked to fix it. A
|
|
38
|
+
refused plan never becomes SQL.
|
|
39
|
+
- Only a plan that passes is rendered to SQL, deterministically, with `sqlglot`,
|
|
40
|
+
then executed and summarised.
|
|
41
|
+
|
|
42
|
+
The whole pipeline is 13 steps, five of them decided by a model; the
|
|
43
|
+
playground's Pipeline page lists them.
|
|
44
|
+
|
|
45
|
+
## Quickstart
|
|
46
|
+
|
|
47
|
+
Requires Python 3.12 or newer.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install "nl2sql-engine[demo]"
|
|
51
|
+
nl2sql demo
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
That writes a demo project into `./nl2sql-demo`, copies in three SQLite
|
|
55
|
+
databases -- [Chinook](https://github.com/nadeem4/nl2sql/blob/main/THIRD_PARTY_NOTICES.md),
|
|
56
|
+
`support` and `webanalytics` -- indexes their schemas locally (no key; the
|
|
57
|
+
first run downloads a ~79 MB ONNX embedding model) and opens the playground on
|
|
58
|
+
<http://127.0.0.1:8765/>.
|
|
59
|
+
|
|
60
|
+
**Answering a question needs a model:** `--api-key`, or `OPENAI_API_KEY`,
|
|
61
|
+
`OPENROUTER_API_KEY` or `ANTHROPIC_API_KEY` in the environment (Claude needs
|
|
62
|
+
`pip install "nl2sql-engine[demo,anthropic]"`), a key pasted into the
|
|
63
|
+
playground's Settings page, or a reachable Ollama. Without one the demo runs
|
|
64
|
+
in replay mode, which has no recorded answers out of the box, so it can show the
|
|
65
|
+
schema and the index but answers nothing. `nl2sql demo --record` (with an
|
|
66
|
+
OpenAI, OpenRouter or Anthropic key) records the guided questions for later key-free runs.
|
|
67
|
+
|
|
68
|
+
`nl2sql demo --hosted` runs the public variant above yourself: the server holds
|
|
69
|
+
no API key, each visitor pastes their own into the page for that question only
|
|
70
|
+
(without one, the guided questions replay recorded runs),
|
|
71
|
+
the sample databases are opened read-only, questions are rate limited per
|
|
72
|
+
visitor and capped per session, and Settings, Rebuild, ratings and `--record`
|
|
73
|
+
are refused. See
|
|
74
|
+
[Hosted demo](https://github.com/nadeem4/nl2sql/blob/main/docs/deployment/hosted-demo.md)
|
|
75
|
+
in the full docs.
|
|
76
|
+
|
|
77
|
+
The playground shows each answer's plan, validation checks, SQL, rows and cost,
|
|
78
|
+
a per-node Debug view, a Pipeline page listing every step of a run with the
|
|
79
|
+
model each used, a Retrieval inspector over the live index, and a right/wrong
|
|
80
|
+
rating per answer that `nl2sql feedback stats` reports on.
|
|
81
|
+
|
|
82
|
+
## CLI
|
|
83
|
+
|
|
84
|
+
From the demo folder (`cd nl2sql-demo`):
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
nl2sql --env demo run "How many customers do we have, by country?"
|
|
88
|
+
nl2sql --env demo run --role viewer "Who are the top 5 customers by total spend?" # refused
|
|
89
|
+
nl2sql --env demo run --no-exec "Which artist has the most albums?" # plan only
|
|
90
|
+
nl2sql --env demo index # re-index the schema
|
|
91
|
+
nl2sql --env demo doctor # check drivers, connectivity, key and index
|
|
92
|
+
nl2sql --env demo benchmark --tier 1 # gold plans, no key
|
|
93
|
+
nl2sql --env demo benchmark --tier 2 --model gpt-5.4 --max-cost 5
|
|
94
|
+
nl2sql --env demo benchmark retrieval # retrieval recall, no key
|
|
95
|
+
nl2sql --env demo feedback stats # ratings and guardrail rates
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Every command: [CLI reference](https://github.com/nadeem4/nl2sql#cli-reference).
|
|
99
|
+
|
|
100
|
+
## Python
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
from nl2sql import NL2SQL, UserContext
|
|
104
|
+
|
|
105
|
+
engine = NL2SQL(env="demo") # loads .env.demo from the working directory
|
|
106
|
+
result = engine.run_query(
|
|
107
|
+
"How many customers are there?",
|
|
108
|
+
user_context=UserContext(roles=["admin"]),
|
|
109
|
+
)
|
|
110
|
+
for sq in result.sub_queries:
|
|
111
|
+
print(sq.sql, [c.name for c in sq.validation if c.passed])
|
|
112
|
+
print(result.final_answer["summary"] if result.final_answer else result.errors)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Pass a `user_context` with a role: with none, `run_query` currently raises a
|
|
116
|
+
validation error, and an unknown role is refused.
|
|
117
|
+
|
|
118
|
+
## Install extras
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
pip install "nl2sql-engine[postgres]" # or [mysql], [mssql], [duckdb]
|
|
122
|
+
pip install "nl2sql-engine[all]" # every database driver; not [demo] or [anthropic]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
SQLite needs no extra.
|
|
126
|
+
|
|
127
|
+
## Security
|
|
128
|
+
|
|
129
|
+
- The LLM provider receives the question, the schema the planner needs, sample
|
|
130
|
+
column values of tables the role may read, and the result rows (for the
|
|
131
|
+
written answer).
|
|
132
|
+
- RBAC is a per-role table allowlist; a plan touching a forbidden table is
|
|
133
|
+
refused. No column masking or row-level security.
|
|
134
|
+
- Read-only is not checked by the executor: only SELECTs are generated, and a
|
|
135
|
+
SQLite datasource can be opened read-only with `options.read_only: true` (the
|
|
136
|
+
three sample databases are), but no other dialect is. Give the engine a
|
|
137
|
+
read-only database user.
|
|
138
|
+
- No authentication: the caller supplies the role.
|
|
139
|
+
- No cross-database questions and no conversation yet: each sub-query is
|
|
140
|
+
planned against one datasource, and each question is answered on its own.
|
|
141
|
+
|
|
142
|
+
## Status
|
|
143
|
+
|
|
144
|
+
0.1.x. `nl2sql-adapter-sdk`, `nl2sql-engine` and `nl2sql-api` share one version
|
|
145
|
+
and are released together. Known limitations, benchmark results and the
|
|
146
|
+
roadmap: <https://github.com/nadeem4/nl2sql#project-status-limitations-and-roadmap>.
|
|
147
|
+
MIT licensed.
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
# Third-Party Notices
|
|
2
|
+
|
|
3
|
+
This project distributes the following third-party material. Each entry lists the
|
|
4
|
+
project, its source, the version vendored, and the full text of its license.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Chinook Database
|
|
9
|
+
|
|
10
|
+
- **Project:** Chinook Database
|
|
11
|
+
- **URL:** https://github.com/lerocha/chinook-database
|
|
12
|
+
- **Release tag:** v1.4.5
|
|
13
|
+
- **Vendored file:** `packages/nl2sql/src/nl2sql/datasets/chinook.sqlite`
|
|
14
|
+
(the `Chinook_Sqlite.sqlite` asset of that release, renamed)
|
|
15
|
+
- **License:** MIT
|
|
16
|
+
|
|
17
|
+
### License text
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
Chinook Database
|
|
21
|
+
--------------------------------------
|
|
22
|
+
Copyright (c) 2008-2024 Luis Rocha
|
|
23
|
+
|
|
24
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
25
|
+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
|
26
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
|
27
|
+
to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
28
|
+
|
|
29
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
30
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Schibsted Grotesk
|
|
36
|
+
|
|
37
|
+
- **Project:** Schibsted Grotesk
|
|
38
|
+
- **URL:** https://github.com/schibsted/schibsted-grotesk
|
|
39
|
+
- **Package:** `@fontsource-variable/schibsted-grotesk` 5.3.0 (Latin subset, variable weight)
|
|
40
|
+
- **Vendored in:** `packages/nl2sql/src/nl2sql/cli/demo/playground/static/index.html`
|
|
41
|
+
(inlined into the built page)
|
|
42
|
+
- **License:** SIL Open Font License 1.1
|
|
43
|
+
|
|
44
|
+
### License text
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
Copyright 2023 The Schibsted-Grotesk Project Authors (https://github.com/schibsted/schibsted-grotesk) SchibstedGrotesk-Italic[wght].ttf: Copyright 2023 The Schibsted-Grotesk Project Authors (https://github.com/schibsted/schibsted-grotesk)
|
|
48
|
+
|
|
49
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
50
|
+
This license is copied below, and is also available with a FAQ at:
|
|
51
|
+
http://scripts.sil.org/OFL
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
-----------------------------------------------------------
|
|
55
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
56
|
+
-----------------------------------------------------------
|
|
57
|
+
|
|
58
|
+
PREAMBLE
|
|
59
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
60
|
+
development of collaborative font projects, to support the font creation
|
|
61
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
62
|
+
open framework in which fonts may be shared and improved in partnership
|
|
63
|
+
with others.
|
|
64
|
+
|
|
65
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
66
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
67
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
68
|
+
redistributed and/or sold with any software provided that any reserved
|
|
69
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
70
|
+
however, cannot be released under any other type of license. The
|
|
71
|
+
requirement for fonts to remain under this license does not apply
|
|
72
|
+
to any document created using the fonts or their derivatives.
|
|
73
|
+
|
|
74
|
+
DEFINITIONS
|
|
75
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
76
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
77
|
+
include source files, build scripts and documentation.
|
|
78
|
+
|
|
79
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
80
|
+
copyright statement(s).
|
|
81
|
+
|
|
82
|
+
"Original Version" refers to the collection of Font Software components as
|
|
83
|
+
distributed by the Copyright Holder(s).
|
|
84
|
+
|
|
85
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
86
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
87
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
88
|
+
new environment.
|
|
89
|
+
|
|
90
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
91
|
+
writer or other person who contributed to the Font Software.
|
|
92
|
+
|
|
93
|
+
PERMISSION & CONDITIONS
|
|
94
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
95
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
96
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
97
|
+
Software, subject to the following conditions:
|
|
98
|
+
|
|
99
|
+
1) Neither the Font Software nor any of its individual components,
|
|
100
|
+
in Original or Modified Versions, may be sold by itself.
|
|
101
|
+
|
|
102
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
103
|
+
redistributed and/or sold with any software, provided that each copy
|
|
104
|
+
contains the above copyright notice and this license. These can be
|
|
105
|
+
included either as stand-alone text files, human-readable headers or
|
|
106
|
+
in the appropriate machine-readable metadata fields within text or
|
|
107
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
108
|
+
|
|
109
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
110
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
111
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
112
|
+
presented to the users.
|
|
113
|
+
|
|
114
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
115
|
+
Software shall not be used to promote, endorse or advertise any
|
|
116
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
117
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
118
|
+
permission.
|
|
119
|
+
|
|
120
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
121
|
+
must be distributed entirely under this license, and must not be
|
|
122
|
+
distributed under any other license. The requirement for fonts to
|
|
123
|
+
remain under this license does not apply to any document created
|
|
124
|
+
using the Font Software.
|
|
125
|
+
|
|
126
|
+
TERMINATION
|
|
127
|
+
This license becomes null and void if any of the above conditions are
|
|
128
|
+
not met.
|
|
129
|
+
|
|
130
|
+
DISCLAIMER
|
|
131
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
132
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
133
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
134
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
135
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
136
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
137
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
138
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
139
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Fragment Mono
|
|
145
|
+
|
|
146
|
+
- **Project:** Fragment Mono
|
|
147
|
+
- **URL:** https://github.com/weiweihuanghuang/fragment-mono
|
|
148
|
+
- **Package:** `@fontsource/fragment-mono` 5.3.0 (Latin subset, regular)
|
|
149
|
+
- **Vendored in:** `packages/nl2sql/src/nl2sql/cli/demo/playground/static/index.html`
|
|
150
|
+
(inlined into the built page)
|
|
151
|
+
- **License:** SIL Open Font License 1.1
|
|
152
|
+
|
|
153
|
+
### License text
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
Copyright 2022 The Fragment-Mono Project Authors (https://github.com/weiweihuanghuang/fragment-mono) FragmentMono-Italic.ttf: Copyright 2022 The Fragment-Mono Project Authors (https://github.com/weiweihuanghuang/fragment-mono)
|
|
157
|
+
|
|
158
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
159
|
+
This license is copied below, and is also available with a FAQ at:
|
|
160
|
+
http://scripts.sil.org/OFL
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
-----------------------------------------------------------
|
|
164
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
165
|
+
-----------------------------------------------------------
|
|
166
|
+
|
|
167
|
+
PREAMBLE
|
|
168
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
169
|
+
development of collaborative font projects, to support the font creation
|
|
170
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
171
|
+
open framework in which fonts may be shared and improved in partnership
|
|
172
|
+
with others.
|
|
173
|
+
|
|
174
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
175
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
176
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
177
|
+
redistributed and/or sold with any software provided that any reserved
|
|
178
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
179
|
+
however, cannot be released under any other type of license. The
|
|
180
|
+
requirement for fonts to remain under this license does not apply
|
|
181
|
+
to any document created using the fonts or their derivatives.
|
|
182
|
+
|
|
183
|
+
DEFINITIONS
|
|
184
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
185
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
186
|
+
include source files, build scripts and documentation.
|
|
187
|
+
|
|
188
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
189
|
+
copyright statement(s).
|
|
190
|
+
|
|
191
|
+
"Original Version" refers to the collection of Font Software components as
|
|
192
|
+
distributed by the Copyright Holder(s).
|
|
193
|
+
|
|
194
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
195
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
196
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
197
|
+
new environment.
|
|
198
|
+
|
|
199
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
200
|
+
writer or other person who contributed to the Font Software.
|
|
201
|
+
|
|
202
|
+
PERMISSION & CONDITIONS
|
|
203
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
204
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
205
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
206
|
+
Software, subject to the following conditions:
|
|
207
|
+
|
|
208
|
+
1) Neither the Font Software nor any of its individual components,
|
|
209
|
+
in Original or Modified Versions, may be sold by itself.
|
|
210
|
+
|
|
211
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
212
|
+
redistributed and/or sold with any software, provided that each copy
|
|
213
|
+
contains the above copyright notice and this license. These can be
|
|
214
|
+
included either as stand-alone text files, human-readable headers or
|
|
215
|
+
in the appropriate machine-readable metadata fields within text or
|
|
216
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
217
|
+
|
|
218
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
219
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
220
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
221
|
+
presented to the users.
|
|
222
|
+
|
|
223
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
224
|
+
Software shall not be used to promote, endorse or advertise any
|
|
225
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
226
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
227
|
+
permission.
|
|
228
|
+
|
|
229
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
230
|
+
must be distributed entirely under this license, and must not be
|
|
231
|
+
distributed under any other license. The requirement for fonts to
|
|
232
|
+
remain under this license does not apply to any document created
|
|
233
|
+
using the Font Software.
|
|
234
|
+
|
|
235
|
+
TERMINATION
|
|
236
|
+
This license becomes null and void if any of the above conditions are
|
|
237
|
+
not met.
|
|
238
|
+
|
|
239
|
+
DISCLAIMER
|
|
240
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
241
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
242
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
243
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
244
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
245
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
246
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
247
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
248
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
249
|
+
```
|