Skip to main content

LLM helper for psql

Project description

gptsql

An LLM wrapper around your database connection. Think of it as a "smart" version of the psql cli.

Example:

    python -m gptsql
    > show me the schemas
    thinking...
    Running select query: SELECT schema_name FROM information_schema.schemata;
    processing the function response...
    Here are the schemas in your database:

    1. pg_catalog
    2. information_schema
    3. analytics
    4. public
    5. aws_commons
    6. bi_staging
    7. rds_tools

    > show me tables that start with "streaming_"
    thinking...
    Running select query: SELECT table_name FROM information_schema.tables WHERE table_name LIKE 'streaming_%%';
    processing the function response...
    Here are the tables that start with "streaming_":

    1. streaming_bookings
    2. streaming_campaign_vast_tags
    3. streaming_campaigns
    4. streaming_cpx_predictions
    5. streaming_hourly_counts
    6. streaming_hourly_lift
    7. streaming_hourly_lift_dbx
    8. streaming_hourly_lift_dbx_staging
    9. streaming_impressions_log_entries
    10. streaming_impressions_logs
    11. streaming_network_extreme_reach_inventory_id_map
    12. streaming_networks
    13. streaming_provider_company_map
    14. streaming_providers
    15. streaming_reconciliations
    16. streaming_spends
    17. streaming_spends_dbx
    18. streaming_spends_dbx_staging    

Getting started

Setup your .env file from env.example. Then source the values into your environment.

Run the CLI with:

python -m gptsql

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gptsql-0.1.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

gptsql-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file gptsql-0.1.0.tar.gz.

File metadata

  • Download URL: gptsql-0.1.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.9.13 Darwin/23.1.0

File hashes

Hashes for gptsql-0.1.0.tar.gz
Algorithm Hash digest
SHA256 69477945e88ba61f5f597339f040361a0d412aca0412b6c8e969c86dc0da76ea
MD5 79634c0c5d3d812c58bcb7cb64ca10d1
BLAKE2b-256 cc1f454d42e2eeaf222d0cb9fb4d7af2119b383e55ecff3c0d9d16fe64907389

See more details on using hashes here.

File details

Details for the file gptsql-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gptsql-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.9.13 Darwin/23.1.0

File hashes

Hashes for gptsql-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c43f056f4ec83bf53581428e44ac9346654b9074bd85a185b3632b5fe57d3ba9
MD5 405586f85f98fea84dd9c9ce138ccca6
BLAKE2b-256 5aa17a2b2cc4af11cb05fdc0efc583942abd746aa05901f6da79060cf316c678

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page