Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ labels: bug

<!--
Security vulnerabilities: do not open an issue. Report them privately, see
https://github.com/vericto/vericto-python/security/policy
https://github.com/vericto/python-sdk/security/policy

Rules and SQL parsing live in vericto-engine. If a specific statement got the wrong
verdict, you can report it here or in vericto-engine; we move issues to the right
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
blank_issues_enabled: true
contact_links:
- name: Propose a rule or report a wrong verdict for a SQL statement
url: https://github.com/vericto/vericto-engine/issues/new/choose
url: https://github.com/vericto/engine/issues/new/choose
about: Rules and SQL parsing live in vericto-engine; the SDK asks the Vericto API for each verdict.
- name: Report a problem with the Node.js SDK
url: https://github.com/vericto/vericto-node/issues/new/choose
about: "@vericto/sdk lives in vericto-node."
- name: Report a security vulnerability
url: https://github.com/vericto/vericto-python/security/policy
url: https://github.com/vericto/python-sdk/security/policy
about: Report it privately (security@vericto.com) instead of in a public issue. See SECURITY.md.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ jobs:
run: |
set -euo pipefail
asset=vericto-cli-x86_64-unknown-linux-musl.tar.xz
base="https://github.com/vericto/vericto-cli/releases/download/v$VERICTO_CLI_VERSION"
base="https://github.com/vericto/cli/releases/download/v$VERICTO_CLI_VERSION"
dir="$RUNNER_TEMP/vericto-cli"
mkdir -p "$dir"
cd "$dir"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# PyPI trusted publishing (OIDC): no API token is stored anywhere. Before the first
# tag, add a "pending publisher" on https://pypi.org/manage/account/publishing/ with
# project: vericto owner: vericto repository: vericto-python
# project: vericto owner: vericto repository: python-sdk
# workflow: release.yml environment: pypi
# and create the `pypi` environment in the repository settings (required reviewer).
#
Expand Down
2 changes: 1 addition & 1 deletion CLA_PRIVACY_NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ signing.
## Storage, visibility and international processing

The data is stored in `signatures/v1.1/cla.json` on the `cla-signatures` branch
of GitHub repository `vericto/vericto-python`. Because the repository is
of GitHub repository `vericto/python-sdk`. Because the repository is
public, the signature record may be publicly visible. GitHub also stores the
pull request and signature comment under its own terms and privacy statement.

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ verdict before each statement runs. Contributions that fit here:
Contributions that belong elsewhere:

- A statement that got the wrong verdict, a new rule, SQL parsing →
[vericto-engine](https://github.com/vericto/vericto-engine).
[vericto-engine](https://github.com/vericto/engine).
- The Node.js SDK → [vericto-node](https://github.com/vericto/vericto-node).
- The `vericto` command line tool →
[vericto-cli](https://github.com/vericto/vericto-cli).
[vericto-cli](https://github.com/vericto/cli).

## Getting started

Expand Down
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ More drivers and every agent framework: [Frameworks](#frameworks).

Check SQL with no account, no API key and no network. `Vericto(offline=True)`
(or `VERICTO_OFFLINE=1`) evaluates each statement with the engine built into the
[Vericto CLI](https://github.com/vericto/vericto-cli), which the SDK runs as a
[Vericto CLI](https://github.com/vericto/cli), which the SDK runs as a
separate process (`vericto serve --stdio`). Every wrapper and integration works
unchanged, and the result is the same `Verdict`, with `mode="offline"`,
`engine_version` and `ruleset_version` (`standard@engine-5.0.0` with CLI 2.1.0).
Expand All @@ -170,7 +170,7 @@ Install the CLI, 2.1.0 or later, with any one of:
npm i -g @vericto/vericto-cli
brew install vericto/tap/vericto
scoop bucket add vericto https://github.com/vericto/scoop-bucket && scoop install vericto/vericto
# or a binary from https://github.com/vericto/vericto-cli/releases (each archive has a .sha256)
# or a binary from https://github.com/vericto/cli/releases (each archive has a .sha256)
vericto --version # vericto 2.1.0
```

Expand Down Expand Up @@ -545,15 +545,15 @@ Runtime API stand-in, with scripted models) and the versions it was tested with.

| Framework | Kind | Guide | Tested with |
|---|---|---|---|
| LangChain (`SQLDatabase`, `create_sql_agent`, `create_agent`, SQL tools) | Official: `vericto.langchain` (`vericto[langchain]`) | [docs/frameworks/langchain.md](https://github.com/vericto/vericto-python/blob/main/docs/frameworks/langchain.md) | langchain-core 1.7.0, langchain-community 0.4.2, langchain-classic 1.0.8, langchain 1.4.7 |
| LlamaIndex (`NLSQLTableQueryEngine`, `SQLTableRetrieverQueryEngine`, `NLSQLRetriever`) | Official: `vericto.llamaindex` (`vericto[llamaindex]`) | [docs/frameworks/llamaindex.md](https://github.com/vericto/vericto-python/blob/main/docs/frameworks/llamaindex.md) | llama-index-core 0.14.25 |
| SQLAlchemy (ORM, Core, `text()`; `AsyncEngine`) | Official: `vericto.sqlalchemy` (`vericto[sqlalchemy]`) | [docs/frameworks/sqlalchemy.md](https://github.com/vericto/vericto-python/blob/main/docs/frameworks/sqlalchemy.md) | SQLAlchemy 2.1.6 |
| Any DB-API driver; `sqlite3`; snowflake-connector-python | Official: `vericto.wrap`, `vericto.sqlite`, `vericto.snowflake` | [docs/frameworks/dbapi.md](https://github.com/vericto/vericto-python/blob/main/docs/frameworks/dbapi.md) | sqlite3, psycopg 3.3.6 |
| Django | Pattern: `connection.execute_wrapper` | [docs/frameworks/django.md](https://github.com/vericto/vericto-python/blob/main/docs/frameworks/django.md) | Django 6.1.2 |
| CrewAI | Pattern: a guarded `@tool` | [docs/frameworks/crewai.md](https://github.com/vericto/vericto-python/blob/main/docs/frameworks/crewai.md) | crewai 1.15.30 |
| OpenAI Agents SDK (`function_tool`, tool input guardrails, MCP server tools) | Official: `vericto.openai_agents` (`vericto[openai-agents]`) | [docs/frameworks/openai-agents.md](https://github.com/vericto/vericto-python/blob/main/docs/frameworks/openai-agents.md) | openai-agents 0.24.0 |
| Pydantic AI (`FunctionToolset`, `MCPToolset`, any toolset) | Official: `vericto.pydantic_ai` (`vericto[pydantic-ai]`) | [docs/frameworks/pydantic-ai.md](https://github.com/vericto/vericto-python/blob/main/docs/frameworks/pydantic-ai.md) | pydantic-ai-slim 2.64.0 |
| Vanna 2.x | Pattern: a guarded `SqlRunner` | [docs/frameworks/vanna.md](https://github.com/vericto/vericto-python/blob/main/docs/frameworks/vanna.md) | vanna 2.0.2 |
| LangChain (`SQLDatabase`, `create_sql_agent`, `create_agent`, SQL tools) | Official: `vericto.langchain` (`vericto[langchain]`) | [docs/frameworks/langchain.md](https://github.com/vericto/python-sdk/blob/main/docs/frameworks/langchain.md) | langchain-core 1.7.0, langchain-community 0.4.2, langchain-classic 1.0.8, langchain 1.4.7 |
| LlamaIndex (`NLSQLTableQueryEngine`, `SQLTableRetrieverQueryEngine`, `NLSQLRetriever`) | Official: `vericto.llamaindex` (`vericto[llamaindex]`) | [docs/frameworks/llamaindex.md](https://github.com/vericto/python-sdk/blob/main/docs/frameworks/llamaindex.md) | llama-index-core 0.14.25 |
| SQLAlchemy (ORM, Core, `text()`; `AsyncEngine`) | Official: `vericto.sqlalchemy` (`vericto[sqlalchemy]`) | [docs/frameworks/sqlalchemy.md](https://github.com/vericto/python-sdk/blob/main/docs/frameworks/sqlalchemy.md) | SQLAlchemy 2.1.6 |
| Any DB-API driver; `sqlite3`; snowflake-connector-python | Official: `vericto.wrap`, `vericto.sqlite`, `vericto.snowflake` | [docs/frameworks/dbapi.md](https://github.com/vericto/python-sdk/blob/main/docs/frameworks/dbapi.md) | sqlite3, psycopg 3.3.6 |
| Django | Pattern: `connection.execute_wrapper` | [docs/frameworks/django.md](https://github.com/vericto/python-sdk/blob/main/docs/frameworks/django.md) | Django 6.1.2 |
| CrewAI | Pattern: a guarded `@tool` | [docs/frameworks/crewai.md](https://github.com/vericto/python-sdk/blob/main/docs/frameworks/crewai.md) | crewai 1.15.30 |
| OpenAI Agents SDK (`function_tool`, tool input guardrails, MCP server tools) | Official: `vericto.openai_agents` (`vericto[openai-agents]`) | [docs/frameworks/openai-agents.md](https://github.com/vericto/python-sdk/blob/main/docs/frameworks/openai-agents.md) | openai-agents 0.24.0 |
| Pydantic AI (`FunctionToolset`, `MCPToolset`, any toolset) | Official: `vericto.pydantic_ai` (`vericto[pydantic-ai]`) | [docs/frameworks/pydantic-ai.md](https://github.com/vericto/python-sdk/blob/main/docs/frameworks/pydantic-ai.md) | pydantic-ai-slim 2.64.0 |
| Vanna 2.x | Pattern: a guarded `SqlRunner` | [docs/frameworks/vanna.md](https://github.com/vericto/python-sdk/blob/main/docs/frameworks/vanna.md) | vanna 2.0.2 |
| dbt | Official: `vericto-dbt check` (`vericto[dbt]`) | [dbt](#dbt) | dbt manifest v12 fixtures (no dbt runtime) |
| Airflow 3 | Official: `vericto.airflow` (`vericto[airflow]`) | [Airflow](#airflow) | Airflow 3.3.2 (common-sql 2.1.1), official constraints |
| LangChain.js | `@vericto/sdk/langchain` (Node) | [vericto-node](https://github.com/vericto/vericto-node) | see vericto-node |
Expand All @@ -562,7 +562,7 @@ All on Python 3.13 with vericto 0.5.0 (the OpenAI Agents SDK with 0.6.0, Pydanti
`guard.prepare(sql, dialect)` right before your code executes `sql`, execute what
it returns, hand a `VerictoBlocked` back to the model as text (rule and
`suggested_fix`), and let `VerictoUnavailable` / `VerictoConfigError` propagate so
an outage fails closed. Overview: [docs/frameworks](https://github.com/vericto/vericto-python/blob/main/docs/frameworks/README.md).
an outage fails closed. Overview: [docs/frameworks](https://github.com/vericto/python-sdk/blob/main/docs/frameworks/README.md).

## Integrations

Expand All @@ -577,7 +577,7 @@ allowance instead.

### LangChain

Full guide: [docs/frameworks/langchain.md](https://github.com/vericto/vericto-python/blob/main/docs/frameworks/langchain.md).
Full guide: [docs/frameworks/langchain.md](https://github.com/vericto/python-sdk/blob/main/docs/frameworks/langchain.md).

<!-- docs-check: skip a fragment (llm is your chat model); the guide's examples run -->
```python
Expand Down Expand Up @@ -616,7 +616,7 @@ after SQLAlchemy compiles it; schema reflection is not sent.

### LlamaIndex

Full guide: [docs/frameworks/llamaindex.md](https://github.com/vericto/vericto-python/blob/main/docs/frameworks/llamaindex.md).
Full guide: [docs/frameworks/llamaindex.md](https://github.com/vericto/python-sdk/blob/main/docs/frameworks/llamaindex.md).

<!-- docs-check: skip a fragment (engine and llm are yours); the guide's example runs -->
```python
Expand All @@ -637,7 +637,7 @@ for LangChain.

### OpenAI Agents SDK

Full guide: [docs/frameworks/openai-agents.md](https://github.com/vericto/vericto-python/blob/main/docs/frameworks/openai-agents.md).
Full guide: [docs/frameworks/openai-agents.md](https://github.com/vericto/python-sdk/blob/main/docs/frameworks/openai-agents.md).

<!-- docs-check: skip a fragment (pool is your database pool); the guide's examples run -->
```python
Expand Down Expand Up @@ -672,7 +672,7 @@ guardrail = vericto_tool_input_guardrail(dialect="postgres", argument="sql", too

### Pydantic AI

Full guide: [docs/frameworks/pydantic-ai.md](https://github.com/vericto/vericto-python/blob/main/docs/frameworks/pydantic-ai.md).
Full guide: [docs/frameworks/pydantic-ai.md](https://github.com/vericto/python-sdk/blob/main/docs/frameworks/pydantic-ai.md).

<!-- docs-check: skip a fragment (pool is your database pool); the guide's examples run -->
```python
Expand Down Expand Up @@ -754,7 +754,7 @@ imported: only its artifacts are read.
`3` ("choose one"); a local engine failure exits `4`.
- SARIF points at the model file (line 1: compiled lines do not map to the Jinja
source; the message gives the compiled line). GitHub Actions example:
[examples/dbt_github_actions.yml](https://github.com/vericto/vericto-python/blob/main/examples/dbt_github_actions.yml).
[examples/dbt_github_actions.yml](https://github.com/vericto/python-sdk/blob/main/examples/dbt_github_actions.yml).

The command is `vericto-dbt`, not `vericto dbt`: `vericto` is vericto-cli's
binary, and a Python script of the same name would shadow it on `PATH`.
Expand All @@ -774,7 +774,7 @@ VerictoSQLExecuteQueryOperator(task_id="purge", conn_id="warehouse", sql="sql/pu
```

Or guard the SQL tasks you already have, in `airflow_local_settings.py` on the
DAG processor **and** the workers ([example](https://github.com/vericto/vericto-python/blob/main/examples/airflow_local_settings.py)):
DAG processor **and** the workers ([example](https://github.com/vericto/python-sdk/blob/main/examples/airflow_local_settings.py)):

<!-- docs-check: skip needs Airflow; examples/airflow_local_settings.py -->
```python
Expand Down Expand Up @@ -935,12 +935,12 @@ A skipped run (`1 skipped` per test) means a variable is missing.

## Contributing

See [CONTRIBUTING.md](https://github.com/vericto/vericto-python/blob/main/CONTRIBUTING.md)
See [CONTRIBUTING.md](https://github.com/vericto/python-sdk/blob/main/CONTRIBUTING.md)
for the checks CI runs, the coverage gate, and how releases are cut.

## Security

See [SECURITY.md](https://github.com/vericto/vericto-python/blob/main/SECURITY.md). Report vulnerabilities to security@vericto.com,
See [SECURITY.md](https://github.com/vericto/python-sdk/blob/main/SECURITY.md). Report vulnerabilities to security@vericto.com,
not in public issues.

`vericto` accepts `urllib3>=1.26.18,<3` so it fits the environments it is
Expand All @@ -951,11 +951,11 @@ GHSA-vxq7-64xx-v4gw. The repository's dev lock (`uv.lock`) pins 2.8.0.

## License

Open source under the [Apache License 2.0](https://github.com/vericto/vericto-python/blob/main/LICENSE) (SPDX `Apache-2.0`) since
Open source under the [Apache License 2.0](https://github.com/vericto/python-sdk/blob/main/LICENSE) (SPDX `Apache-2.0`) since
0.4.0. Versions 0.3.2 and earlier were released under the Elastic License 2.0
and remain under it. Copyright 2026 Vericto S.A.S.; see [NOTICE](https://github.com/vericto/vericto-python/blob/main/NOTICE). The
and remain under it. Copyright 2026 Vericto S.A.S.; see [NOTICE](https://github.com/vericto/python-sdk/blob/main/NOTICE). The
license grants no right to the Vericto name or logo: see
[TRADEMARKS.md](https://github.com/vericto/vericto-python/blob/main/TRADEMARKS.md). The Vericto service the SDK calls is offered
[TRADEMARKS.md](https://github.com/vericto/python-sdk/blob/main/TRADEMARKS.md). The Vericto service the SDK calls is offered
under its own [terms](https://vericto.com/terms). Offline mode runs the Vericto
CLI, licensed AGPL-3.0-only, as a separate process; the SDK never links, imports
or bundles the engine, so it stays Apache-2.0.
Expand Down Expand Up @@ -1006,7 +1006,7 @@ con `ModelRetry`, y si Vericto devuelve una consulta aprobada se ejecuta esa),
compilado de un proyecto dbt en CI con la API de CI-check, con salida JSON/SARIF)
y `vericto.airflow` (operador y política de clúster). Para Django, CrewAI
y Vanna no hay módulo de vericto: las guías de
[docs/frameworks](https://github.com/vericto/vericto-python/blob/main/docs/frameworks/README.md) muestran el patrón (llamar a
[docs/frameworks](https://github.com/vericto/python-sdk/blob/main/docs/frameworks/README.md) muestran el patrón (llamar a
`guard.prepare(sql, dialecto)` justo antes de ejecutar y ejecutar lo que
devuelve), con ejemplos probados y las versiones usadas. Ver
[Frameworks](#frameworks).
Expand Down Expand Up @@ -1059,7 +1059,7 @@ motor corre en el proceso aparte de la CLI, con licencia AGPL-3.0-only; este
paquete nunca lo enlaza, importa ni incluye, y por eso el SDK sigue siendo
Apache-2.0.

Licencia: código abierto bajo la [Apache License 2.0](https://github.com/vericto/vericto-python/blob/main/LICENSE) desde 0.4.0. Las
Licencia: código abierto bajo la [Apache License 2.0](https://github.com/vericto/python-sdk/blob/main/LICENSE) desde 0.4.0. Las
versiones 0.3.2 y anteriores se publicaron bajo la Elastic License 2.0 y siguen
bajo ella. La licencia no otorga derechos sobre la marca Vericto
([TRADEMARKS.md](https://github.com/vericto/vericto-python/blob/main/TRADEMARKS.md)).
([TRADEMARKS.md](https://github.com/vericto/python-sdk/blob/main/TRADEMARKS.md)).
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Report it privately, by either channel:

- Email **security@vericto.com**.
- Open a private report on GitHub:
[Report a vulnerability](https://github.com/vericto/vericto-python/security/advisories/new)
[Report a vulnerability](https://github.com/vericto/python-sdk/security/advisories/new)
(Security tab → "Report a vulnerability"). Only the maintainers can see it.

Include:
Expand All @@ -37,7 +37,7 @@ High-priority issues for this package include:
- **Data leakage to Vericto**: parameter values sent to the API.

Issues in the SQL evaluation itself belong to
[vericto-engine](https://github.com/vericto/vericto-engine/security).
[vericto-engine](https://github.com/vericto/engine/security).

## Disclosure process

Expand Down
2 changes: 1 addition & 1 deletion docs/frameworks/langchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Give a value, or a callable read for every query, for example the `get` of a
`contextvars.ContextVar` your request handler sets. Fixed values are checked
against the server's limits when the object is built; see the README's [Business
policy
context](https://github.com/vericto/vericto-python/blob/main/README.md#business-policy-context)
context](https://github.com/vericto/python-sdk/blob/main/README.md#business-policy-context)
for the limits.

> **Note:** takes effect when business policies are enabled in your workspace.
Expand Down
2 changes: 1 addition & 1 deletion docs/frameworks/sqlalchemy.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ this one.
evaluation (`{"ticket": ..., "tenant": ...}` and the end user's attributes) with
every statement: a value, or a callable read per statement. They take effect when
business policies are enabled in your workspace; see the README's [Business policy
context](https://github.com/vericto/vericto-python/blob/main/README.md#business-policy-context).
context](https://github.com/vericto/python-sdk/blob/main/README.md#business-policy-context).

## Async engines

Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ vericto-dbt = "vericto.dbt:console_main"

[project.urls]
Homepage = "https://vericto.com"
Documentation = "https://github.com/vericto/vericto-python#readme"
Source = "https://github.com/vericto/vericto-python"
Changelog = "https://github.com/vericto/vericto-python/blob/main/CHANGELOG.md"
Issues = "https://github.com/vericto/vericto-python/issues"
Documentation = "https://github.com/vericto/python-sdk#readme"
Source = "https://github.com/vericto/python-sdk"
Changelog = "https://github.com/vericto/python-sdk/blob/main/CHANGELOG.md"
Issues = "https://github.com/vericto/python-sdk/issues"

[dependency-groups]
dev = [
Expand Down
2 changes: 1 addition & 1 deletion src/vericto/offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"Install Vericto CLI 2.1.0 or later: npm i -g @vericto/vericto-cli, "
"brew install vericto/tap/vericto, scoop bucket add vericto "
"https://github.com/vericto/scoop-bucket && scoop install vericto/vericto, or a binary from "
"https://github.com/vericto/vericto-cli/releases. Then put it on PATH, or pass "
"https://github.com/vericto/cli/releases. Then put it on PATH, or pass "
"offline_cli_path= / set VERICTO_CLI."
)
_WHERE = "The local Vericto engine (vericto serve)"
Expand Down