Skip to main content

NatQuery

natquery is a Python package that enables users to interact with relational databases using natural language via a secure, performance-aware command-line interface along with database driven machine learning analytics.

natquery/
│
├── pyproject.toml
├── README.md
├── requirements.txt
│── src/
├   ├── natquery/
│       ├── __init__.py
│
│       # =========================
│       # 1. CLI LAYER
│       # =========================
│       ├── cli/
│       │   ├── __init__.py
│       │   ├── main.py              # Entry point
│       │   ├── shell.py             # Interactive REPL
│       │   ├── commands.py          # CLI command registry
│
│       # =========================
│       # 2. CONFIG LAYER
│       # =========================
│       ├── config/
│       │   ├── __init__.py
│       │   ├── settings.py          # API keys, DB config
│       │   ├── connection.py        # PostgreSQL connection manager
│
│       # =========================
│       # 3. ORCHESTRATION LAYER
│       # =========================
│       ├── orchestration/
│       │   ├── __init__.py
│       │   ├── pipeline.py          # End-to-end coordinator
│       │   ├── error_handler.py
│
│       # =========================
│       # 4. SCHEMA MODULE
│       # =========================
│       ├── schema/
│       │   ├── __init__.py
│       │   ├── extractor.py         # Dynamic schema extraction
│       │   ├── formatter.py         # Convert schema to prompt-friendly text
│
│       # =========================
│       # 5. PROMPT BUILDER
│       # =========================
│       ├── prompt/
│       │   ├── __init__.py
│       │   ├── builder.py           # Structured prompt construction
│
│       # =========================
│       # 6. LLM CLIENT
│       # =========================
│       ├── llm/
│       │   ├── __init__.py
│       │   ├── client.py            # LLM API calls
│       │   ├── self_corrector.py    # Retry & correction mechanism
│
│       # =========================
│       # 7. SECURITY + VALIDATION
│       # =========================
│       ├── security/
│       │   ├── __init__.py
│       │   ├── validator.py         # SELECT-only enforcement
│       │   ├── limiter.py           # LIMIT enforcement
│
│       # =========================
│       # 8. EXECUTION ENGINE
│       # =========================
│       ├── execution/
│       │   ├── __init__.py
│       │   ├── engine.py            # SQL execution
│       │   ├── explain.py           # EXPLAIN / ANALYZE
│
│       # =========================
│       # 9. MACHINE LEARNING
│       # =========================
│       ├── ml/
│       │   ├── __init__.py
│       │   ├── preprocessing.py
│       │   ├── trainer.py
│       │   ├── inference.py
│       │
│       # =========================
│       # 10. PERFORMANCE + LOGGING
│       # =========================
│       ├── observability/
│          ├── __init__.py
│          ├── logger.py
│          ├── cost_analyzer.py
│          ├── index_recommender.py
│
│
├── database/
│   ├── schema.sql
│   ├── seed.py
│   ├── synthetic_data.py
│
├── tests/
│   ├── test_pipeline.py
│   ├── test_security.py
│   ├── test_ml.py
│
└── benchmarks/
    ├── nl_queries.json

Metadata

Release files for natquery 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for natquery 1.0.1
File Size Uploaded
natquery-1.0.1.tar.gz 20.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for natquery 1.0.1
File Interpreter ABI Platform
natquery-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 45.7 kB

Release files / natquery-1.0.1.tar.gz

Download URL natquery-1.0.1.tar.gz
Size 20.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a10cba24d6be80c453952d07b1e6d6d55fdf4cc179518cb1e44ce24fa5f7c64e
BLAKE2b-256 checksum
How to use checksums
3763311cf6c13e1ba0f153e93073a1a06b9a1eaf7b840ed50f5cdc7736cb6431
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / natquery-1.0.1-py3-none-any.whl

Download URL natquery-1.0.1-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1cf68b068e46e73c1e2a8a3c64cc3b13c1c7dc3ada8650d1b68e3e391ac8f5f8
BLAKE2b-256 checksum
How to use checksums
ef34f91c430e44310d09e08e049f89756ae1fb6219064a3333a271068d3b3c0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page