Skip to main content

Validates whether the given SQL code is syntactically correct using. Optionally accepts a database schema to validate against using SQLAlchemy.

Project description

guardrails-ai-valid-sql

Validates whether the given SQL code is syntactically correct using. Optionally accepts a database schema to validate against using SQLAlchemy.

Installation

pip install guardrails-ai-valid-sql

This validator ships local models. After installing, run the post-install step to download them:

python -m guardrails_ai.valid_sql.post_install

Usage

from guardrails import Guard
from guardrails_ai.valid_sql import ValidSQL

guard = Guard().use(ValidSQL)

License

MIT — © Guardrails AI.

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

guardrails_ai_valid_sql-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

guardrails_ai_valid_sql-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: guardrails_ai_valid_sql-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for guardrails_ai_valid_sql-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c552a771521cb7d1409fa187dc5944e1b32ca20b5c6688c4f383087b7a94b81c
MD5 79d1004f2e39e2ccbd4938dc2a2c1057
BLAKE2b-256 7922ddaa2184e67b24ba6641436c9fa32432970972283b2215847bd7f95f0071

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for guardrails_ai_valid_sql-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 feb39431981b41ec7e15cb8f8d62d64d2d0a8b58b9cb699d94d94f17addc514b
MD5 8ef3c11dd980b9d616c9064891728ccc
BLAKE2b-256 4f7a8b48a68101d79aef3636cbbaa51e7f9eeeeb123d4010dea4b1b83289029e

See more details on using hashes here.

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