Skip to main content

PostgreSQL tool for opsmate

Project description

opsmate-tool-postgres

opsmate-tool-postgres is a tool for Opsmate that allows you to interact with PostgreSQL databases with the assistance of a LLM.

Installation

Change directory to this folder and run:

opsmate install opsmate-tool-postgres

To verify the installation, you can run:

$ opsmate list-tools | grep -i postgres
│ PostgresTool         PostgreSQL tool

Usage

First, start the PostgreSQL server using docker-compose:

docker compose -f fixtures/docker-compose.yml up

Then you can test the tool by running:

opsmate chat \
  --runtime-postgres-password postgres \
  --runtime-postgres-host localhost \
  --runtime-postgres-database ecommerce \
  --runtime-postgres-schema ecommerce \
  --tools PostgresTool

Configurable oOptions

$ opsmate chat --help | grep -i postgres
  --postgres-tool-runtime TEXT    The runtime to use for the tool call (env:
                                  POSTGRES_TOOL_RUNTIME)  [default: postgres]
  --runtime-postgres-timeout INTEGER
                                  The timeout of the PostgreSQL server in
                                  seconds (env: RUNTIME_POSTGRES_TIMEOUT)
  --runtime-postgres-schema TEXT  The schema of the PostgreSQL server (env:
                                  RUNTIME_POSTGRES_SCHEMA)  [default: public]
  --runtime-postgres-database TEXT
                                  The database of the PostgreSQL server (env:
                                  RUNTIME_POSTGRES_DATABASE)
  --runtime-postgres-password TEXT
                                  The password of the PostgreSQL server (env:
                                  RUNTIME_POSTGRES_PASSWORD)  [default: ""]
  --runtime-postgres-user TEXT    The user of the PostgreSQL server (env:
                                  RUNTIME_POSTGRES_USER)  [default: postgres]
  --runtime-postgres-port INTEGER
                                  The port of the PostgreSQL server (env:
                                  RUNTIME_POSTGRES_PORT)  [default: 5432]
  --runtime-postgres-host TEXT    The host of the PostgreSQL server (env:
                                  RUNTIME_POSTGRES_HOST)  [default: localhost]

Uninstall

opsmate uninstall -y opsmate-tool-postgres

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

opsmate_tool_postgres-0.1.0a0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opsmate_tool_postgres-0.1.0a0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file opsmate_tool_postgres-0.1.0a0.tar.gz.

File metadata

  • Download URL: opsmate_tool_postgres-0.1.0a0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for opsmate_tool_postgres-0.1.0a0.tar.gz
Algorithm Hash digest
SHA256 09d2433dfb1528261ae7b568df1f715e1f293238e8ae080ef299ae3ef7c97f12
MD5 e3d2f378af8b2066de6f74115015d366
BLAKE2b-256 0d435d2cb64e90e201660c31595b21a144e258ca555b87a26f7a470a7a56a07d

See more details on using hashes here.

Provenance

The following attestation bundles were made for opsmate_tool_postgres-0.1.0a0.tar.gz:

Publisher: publish.yml on jingkaihe/opsmate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opsmate_tool_postgres-0.1.0a0-py3-none-any.whl.

File metadata

File hashes

Hashes for opsmate_tool_postgres-0.1.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 f345a7680e447f5ebf0bf56e55486dad3792e289d29af321f2e6ac6befe03a94
MD5 21f152642ddc6c0733da458742516534
BLAKE2b-256 1255619e4cf8a801f7125dd3b57815cb75b57cbd3b9f6190baac64c59232aeb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for opsmate_tool_postgres-0.1.0a0-py3-none-any.whl:

Publisher: publish.yml on jingkaihe/opsmate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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