Metadata-Version: 2.4
Name: neurocore-skill-postgres
Version: 0.1.0
Summary: PostgreSQL query skill for NeuroCore
Author: NeuroCore Contributors
License-Expression: Apache-2.0
Keywords: ai,database,neurocore,postgres,skill,sql
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Python: >=3.13
Requires-Dist: neurocore-ai>=0.2.0
Requires-Dist: psycopg[binary]>=3.1
Provides-Extra: dev
Requires-Dist: mypy>=1.8; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=9.0.2; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Description-Content-Type: text/markdown

# neurocore-skill-postgres

Run parameterized SQL against PostgreSQL from a NeuroCore flow (psycopg 3).

```bash
pip install neurocore-skill-postgres
export DATABASE_URL=postgresql://user:pass@localhost/db
```

```yaml
components:
  - name: query
    type: postgres
    config:
      sql: "SELECT id, name FROM users WHERE active = %s"
flow:
  type: sequential
  steps:
    - component: query
```

Provide `sql` (and optional `sql_params`) via config or context. Results are
written to `postgres_rows` (a list of row dicts; empty list for non-SELECT
statements, which are committed).

> Use parameterized queries (`%s` placeholders + `sql_params`) — never string
> interpolation — to avoid SQL injection.
