open-privacy-protocol-engine 0.2.0a2__tar.gz → 0.2.0a3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/PKG-INFO +31 -16
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/README.md +26 -7
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/docs/data-sources.md +32 -12
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/pyproject.toml +10 -5
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/src/opp_engine/__init__.py +1 -1
- open_privacy_protocol_engine-0.2.0a3/src/opp_engine/cli.py +390 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/src/opp_engine/connectors.py +42 -2
- open_privacy_protocol_engine-0.2.0a3/src/opp_engine/scan.py +293 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/src/opp_engine/server.py +4 -1
- open_privacy_protocol_engine-0.2.0a3/tests/test_scan.py +276 -0
- open_privacy_protocol_engine-0.2.0a2/src/opp_engine/cli.py +0 -191
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/.github/workflows/ci.yml +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/.github/workflows/release.yml +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/.gitignore +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/CODE_OF_CONDUCT.md +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/CONTRIBUTING.md +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/Dockerfile +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/LICENSE +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/NOTICE +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/SECURITY.md +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/assets/brand/icon-512.png +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/assets/brand/logo-transparent-dark.png +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/assets/brand/logo-transparent-white.png +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/docs/agents.md +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/docs/detectors.md +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/src/opp_engine/data/hygiene_lists.json +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/src/opp_engine/detect.py +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/src/opp_engine/engine.py +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/src/opp_engine/generate.py +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/src/opp_engine/hygiene.py +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/src/opp_engine/mcp_server.py +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/src/opp_engine/model_detector.py +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/src/opp_engine/model_hub.py +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/src/opp_engine/nosql.py +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/src/opp_engine/report.py +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/tests/fixtures/conformance.destinations.yaml +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/tests/fixtures/conformance.opp.yaml +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/tests/fixtures/northwind-coaching.opp.yaml +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/tests/fixtures/northwind.destinations.yaml +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/tests/sample_data.py +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/tests/test_custom.py +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/tests/test_decision.py +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/tests/test_kit.py +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/tests/test_model_and_hygiene.py +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/tests/test_model_hub.py +0 -0
- {open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/tests/test_nosql.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: open-privacy-protocol-engine
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.0a3
|
|
4
4
|
Summary: OPP Engine, the reference engine of the privacy context layer for AI: generate Open Privacy Protocol privacy models from any data source and answer agents' checks with decisions over HTTP and MCP
|
|
5
5
|
Project-URL: Homepage, https://openprivacyprotocol.com/engine/
|
|
6
6
|
Project-URL: Documentation, https://openprivacyprotocol.com/engine/data-sources/
|
|
@@ -18,6 +18,10 @@ Requires-Python: >=3.10
|
|
|
18
18
|
Requires-Dist: numpy>=1.26
|
|
19
19
|
Requires-Dist: onnxruntime>=1.18
|
|
20
20
|
Requires-Dist: open-privacy-protocol>=0.2.0a1
|
|
21
|
+
Requires-Dist: psycopg[binary]>=3.1
|
|
22
|
+
Requires-Dist: pymysql>=1.1
|
|
23
|
+
Requires-Dist: pypdf>=4
|
|
24
|
+
Requires-Dist: python-docx>=1.1
|
|
21
25
|
Requires-Dist: pyyaml>=6.0
|
|
22
26
|
Requires-Dist: sqlalchemy>=2.0
|
|
23
27
|
Requires-Dist: tokenizers>=0.19
|
|
@@ -26,23 +30,17 @@ Requires-Dist: fastapi>=0.110; extra == 'all'
|
|
|
26
30
|
Requires-Dist: mcp<3,>=1.2; extra == 'all'
|
|
27
31
|
Requires-Dist: pyarrow>=15; extra == 'all'
|
|
28
32
|
Requires-Dist: pymongo>=4.6; extra == 'all'
|
|
29
|
-
Requires-Dist: pypdf>=4; extra == 'all'
|
|
30
|
-
Requires-Dist: python-docx>=1.1; extra == 'all'
|
|
31
33
|
Requires-Dist: uvicorn>=0.29; extra == 'all'
|
|
32
34
|
Provides-Extra: documents
|
|
33
|
-
Requires-Dist: pypdf>=4; extra == 'documents'
|
|
34
|
-
Requires-Dist: python-docx>=1.1; extra == 'documents'
|
|
35
35
|
Provides-Extra: mcp
|
|
36
36
|
Requires-Dist: mcp<3,>=1.2; extra == 'mcp'
|
|
37
37
|
Provides-Extra: model
|
|
38
38
|
Provides-Extra: mongodb
|
|
39
39
|
Requires-Dist: pymongo>=4.6; extra == 'mongodb'
|
|
40
40
|
Provides-Extra: mysql
|
|
41
|
-
Requires-Dist: pymysql>=1.1; extra == 'mysql'
|
|
42
41
|
Provides-Extra: parquet
|
|
43
42
|
Requires-Dist: pyarrow>=15; extra == 'parquet'
|
|
44
43
|
Provides-Extra: postgres
|
|
45
|
-
Requires-Dist: psycopg[binary]>=3.1; extra == 'postgres'
|
|
46
44
|
Provides-Extra: server
|
|
47
45
|
Requires-Dist: fastapi>=0.110; extra == 'server'
|
|
48
46
|
Requires-Dist: uvicorn>=0.29; extra == 'server'
|
|
@@ -51,9 +49,7 @@ Requires-Dist: fastapi>=0.110; extra == 'test'
|
|
|
51
49
|
Requires-Dist: httpx>=0.27; extra == 'test'
|
|
52
50
|
Requires-Dist: mcp<3,>=1.2; extra == 'test'
|
|
53
51
|
Requires-Dist: pymongo>=4.6; extra == 'test'
|
|
54
|
-
Requires-Dist: pypdf>=4; extra == 'test'
|
|
55
52
|
Requires-Dist: pytest>=8; extra == 'test'
|
|
56
|
-
Requires-Dist: python-docx>=1.1; extra == 'test'
|
|
57
53
|
Requires-Dist: uvicorn>=0.29; extra == 'test'
|
|
58
54
|
Description-Content-Type: text/markdown
|
|
59
55
|
|
|
@@ -104,7 +100,7 @@ destination will process the content (an ordinary API, a confidential enclave, e
|
|
|
104
100
|
local model), and answers with a decision that names the obligations the sender must fulfil.
|
|
105
101
|
|
|
106
102
|
```
|
|
107
|
-
databases, files,
|
|
103
|
+
databases, files, opp-engine scan acme.opp.yaml opp-engine serve agents
|
|
108
104
|
documents, web pages ───────────────────────► (review, certify) ──────────────────────► (MCP / HTTP)
|
|
109
105
|
```
|
|
110
106
|
|
|
@@ -133,28 +129,47 @@ New to the ideas? Read [Core concepts](https://openprivacyprotocol.com/get-start
|
|
|
133
129
|
|---|---|
|
|
134
130
|
| **Connect anything** | Any SQLAlchemy database URL (PostgreSQL, MySQL, SQL Server, Oracle, SQLite, Snowflake, BigQuery and more with their drivers); MongoDB and MongoDB Atlas (`mongodb://`, `mongodb+srv://`, with the `[mongodb]` extra), nested fields included; CSV, TSV, JSON, JSON Lines and Parquet files; text, Markdown, HTML, PDF and Word documents; folders and web pages |
|
|
135
131
|
| **Generate** | Every column is classified against the OPP baseline catalog from its name and sampled values; text columns and documents get topic classes (health data, HR matters, internal financials); ID columns get their format (`CE-[0-9]{6}`). Each entry carries its evidence and starts `proposed` |
|
|
136
|
-
| **Better with OPP Model** | With the open-weight [OPP Model](https://github.com/kannancet/open-privacy-protocol-model) (downloaded from Hugging Face on first use and applied automatically by `generate`), names, addresses and confidential topics are found in free text and headerless columns, and the organization's own concepts match by meaning |
|
|
132
|
+
| **Better with OPP Model** | With the open-weight [OPP Model](https://github.com/kannancet/open-privacy-protocol-model) (downloaded from Hugging Face on first use and applied automatically by `scan` and `generate`), names, addresses and confidential topics are found in free text and headerless columns, and the organization's own concepts match by meaning |
|
|
137
133
|
| **Industry presets** | `--industry 622110` (a NAICS code) or `--industry healthcare` lists the classes that industry usually holds and were not found |
|
|
138
134
|
| **Hygiene** | Cues, terms and identifier patterns that would match ordinary text are removed and reported |
|
|
139
|
-
| **
|
|
135
|
+
| **One source at a time** | `scan` adds to the model that is there: sources scanned before stay as they are, a source named again is read afresh, `sources` lists them and `remove` takes one out |
|
|
136
|
+
| **Human review** | A Markdown report lists what to check; certified entries survive the next scan |
|
|
140
137
|
| **Serve** | The query engine answers `check` (verdict, findings, safe content), `explain` and `list_classes` over MCP or a REST API |
|
|
141
138
|
|
|
142
139
|
## Quick start
|
|
143
140
|
|
|
144
141
|
```bash
|
|
145
|
-
pip install "open-privacy-protocol-engine[server,mcp
|
|
142
|
+
pip install "open-privacy-protocol-engine[server,mcp]"
|
|
146
143
|
|
|
147
144
|
python tests/sample_data.py demo # a synthetic CRM database, exports and documents
|
|
148
|
-
opp-engine
|
|
149
|
-
|
|
145
|
+
opp-engine scan sqlite:///demo/crm.db demo/docs --org "Acme Coaching (fictional)" --name acme # writes acme.opp.yaml
|
|
146
|
+
opp-engine scan demo/exports # add another source later
|
|
147
|
+
opp-engine sources # what the model covers
|
|
148
|
+
opp-engine remove exports # take a source out again
|
|
150
149
|
|
|
151
150
|
opp-engine check acme.opp.yaml --dest external_ai "Email jane@example.com about CE-123456"
|
|
152
151
|
opp-engine serve acme.opp.yaml --mcp # for any MCP client
|
|
153
152
|
opp-engine serve acme.opp.yaml --http 127.0.0.1:8765 # REST API
|
|
154
153
|
```
|
|
155
154
|
|
|
155
|
+
A source is a database URL, a file, a folder or a web page:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
opp-engine scan postgres://reader@db.internal/crm # asks for the password, hidden; it is not stored
|
|
159
|
+
opp-engine scan env:CRM_URL # or take the whole URL from an environment variable
|
|
160
|
+
```
|
|
161
|
+
|
|
156
162
|
Use a read-only database account. Connection strings are never written into the model; only the
|
|
157
|
-
host and database name are kept.
|
|
163
|
+
host and database name are kept. `scan` reads with the rule detectors and
|
|
164
|
+
[OPP Model](https://huggingface.co/tiny-bubble-company/opp-model), which is downloaded from Hugging Face
|
|
165
|
+
once, verified, and then used from the local cache (`opp-engine model info` shows where). The model
|
|
166
|
+
records which detectors read it under `provenance.notes`.
|
|
167
|
+
|
|
168
|
+
To hand the model to a Hub, add the link the Hub shows: `opp-engine scan SOURCE --hub LINK`, or send
|
|
169
|
+
the file as it is with `opp-engine send LINK`.
|
|
170
|
+
|
|
171
|
+
`opp-engine generate SOURCE... --name N --org O -o FILE` still writes a whole model from the sources
|
|
172
|
+
named in one go, for scripts that rebuild it from scratch.
|
|
158
173
|
|
|
159
174
|
### Connect an agent over MCP
|
|
160
175
|
|
|
@@ -45,7 +45,7 @@ destination will process the content (an ordinary API, a confidential enclave, e
|
|
|
45
45
|
local model), and answers with a decision that names the obligations the sender must fulfil.
|
|
46
46
|
|
|
47
47
|
```
|
|
48
|
-
databases, files,
|
|
48
|
+
databases, files, opp-engine scan acme.opp.yaml opp-engine serve agents
|
|
49
49
|
documents, web pages ───────────────────────► (review, certify) ──────────────────────► (MCP / HTTP)
|
|
50
50
|
```
|
|
51
51
|
|
|
@@ -74,28 +74,47 @@ New to the ideas? Read [Core concepts](https://openprivacyprotocol.com/get-start
|
|
|
74
74
|
|---|---|
|
|
75
75
|
| **Connect anything** | Any SQLAlchemy database URL (PostgreSQL, MySQL, SQL Server, Oracle, SQLite, Snowflake, BigQuery and more with their drivers); MongoDB and MongoDB Atlas (`mongodb://`, `mongodb+srv://`, with the `[mongodb]` extra), nested fields included; CSV, TSV, JSON, JSON Lines and Parquet files; text, Markdown, HTML, PDF and Word documents; folders and web pages |
|
|
76
76
|
| **Generate** | Every column is classified against the OPP baseline catalog from its name and sampled values; text columns and documents get topic classes (health data, HR matters, internal financials); ID columns get their format (`CE-[0-9]{6}`). Each entry carries its evidence and starts `proposed` |
|
|
77
|
-
| **Better with OPP Model** | With the open-weight [OPP Model](https://github.com/kannancet/open-privacy-protocol-model) (downloaded from Hugging Face on first use and applied automatically by `generate`), names, addresses and confidential topics are found in free text and headerless columns, and the organization's own concepts match by meaning |
|
|
77
|
+
| **Better with OPP Model** | With the open-weight [OPP Model](https://github.com/kannancet/open-privacy-protocol-model) (downloaded from Hugging Face on first use and applied automatically by `scan` and `generate`), names, addresses and confidential topics are found in free text and headerless columns, and the organization's own concepts match by meaning |
|
|
78
78
|
| **Industry presets** | `--industry 622110` (a NAICS code) or `--industry healthcare` lists the classes that industry usually holds and were not found |
|
|
79
79
|
| **Hygiene** | Cues, terms and identifier patterns that would match ordinary text are removed and reported |
|
|
80
|
-
| **
|
|
80
|
+
| **One source at a time** | `scan` adds to the model that is there: sources scanned before stay as they are, a source named again is read afresh, `sources` lists them and `remove` takes one out |
|
|
81
|
+
| **Human review** | A Markdown report lists what to check; certified entries survive the next scan |
|
|
81
82
|
| **Serve** | The query engine answers `check` (verdict, findings, safe content), `explain` and `list_classes` over MCP or a REST API |
|
|
82
83
|
|
|
83
84
|
## Quick start
|
|
84
85
|
|
|
85
86
|
```bash
|
|
86
|
-
pip install "open-privacy-protocol-engine[server,mcp
|
|
87
|
+
pip install "open-privacy-protocol-engine[server,mcp]"
|
|
87
88
|
|
|
88
89
|
python tests/sample_data.py demo # a synthetic CRM database, exports and documents
|
|
89
|
-
opp-engine
|
|
90
|
-
|
|
90
|
+
opp-engine scan sqlite:///demo/crm.db demo/docs --org "Acme Coaching (fictional)" --name acme # writes acme.opp.yaml
|
|
91
|
+
opp-engine scan demo/exports # add another source later
|
|
92
|
+
opp-engine sources # what the model covers
|
|
93
|
+
opp-engine remove exports # take a source out again
|
|
91
94
|
|
|
92
95
|
opp-engine check acme.opp.yaml --dest external_ai "Email jane@example.com about CE-123456"
|
|
93
96
|
opp-engine serve acme.opp.yaml --mcp # for any MCP client
|
|
94
97
|
opp-engine serve acme.opp.yaml --http 127.0.0.1:8765 # REST API
|
|
95
98
|
```
|
|
96
99
|
|
|
100
|
+
A source is a database URL, a file, a folder or a web page:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
opp-engine scan postgres://reader@db.internal/crm # asks for the password, hidden; it is not stored
|
|
104
|
+
opp-engine scan env:CRM_URL # or take the whole URL from an environment variable
|
|
105
|
+
```
|
|
106
|
+
|
|
97
107
|
Use a read-only database account. Connection strings are never written into the model; only the
|
|
98
|
-
host and database name are kept.
|
|
108
|
+
host and database name are kept. `scan` reads with the rule detectors and
|
|
109
|
+
[OPP Model](https://huggingface.co/tiny-bubble-company/opp-model), which is downloaded from Hugging Face
|
|
110
|
+
once, verified, and then used from the local cache (`opp-engine model info` shows where). The model
|
|
111
|
+
records which detectors read it under `provenance.notes`.
|
|
112
|
+
|
|
113
|
+
To hand the model to a Hub, add the link the Hub shows: `opp-engine scan SOURCE --hub LINK`, or send
|
|
114
|
+
the file as it is with `opp-engine send LINK`.
|
|
115
|
+
|
|
116
|
+
`opp-engine generate SOURCE... --name N --org O -o FILE` still writes a whole model from the sources
|
|
117
|
+
named in one go, for scripts that rebuild it from scratch.
|
|
99
118
|
|
|
100
119
|
### Connect an agent over MCP
|
|
101
120
|
|
{open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/docs/data-sources.md
RENAMED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
# Connecting data sources
|
|
2
2
|
|
|
3
|
-
`opp-engine
|
|
4
|
-
model. Pass any mix of database URLs, files, folders
|
|
3
|
+
`opp-engine scan` reads one or more sources, samples their values in memory, and writes a privacy
|
|
4
|
+
model, or adds to the one that is already in the folder. Pass any mix of database URLs, files, folders
|
|
5
|
+
and web pages:
|
|
5
6
|
|
|
6
7
|
```bash
|
|
7
|
-
opp-engine
|
|
8
|
+
opp-engine scan <source> [<source> ...]
|
|
8
9
|
```
|
|
9
10
|
|
|
11
|
+
The first scan asks for the organization name (or takes `--org "Acme"`) and writes
|
|
12
|
+
`<name>.opp.yaml`. Later scans need only the source.
|
|
13
|
+
|
|
14
|
+
| Command | What it does |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `opp-engine scan SOURCE...` | Reads the sources into the model. Sources scanned before and not named again stay as they are; a source named again is read afresh and keeps its certified entries. Concepts, terms and rules are never touched. |
|
|
17
|
+
| `opp-engine sources` | Lists the sources in the model, with what was found in each (`--json` for scripts). |
|
|
18
|
+
| `opp-engine remove ID...` | Takes sources out, by id or locator. Identifier formats only they used go with them, unless certified. |
|
|
19
|
+
| `opp-engine send LINK` | Sends the model to a Hub as a draft. `scan ... --hub LINK` does both in one go. |
|
|
20
|
+
|
|
21
|
+
All four work on the `.opp.yaml` in the current folder; name another with `--model FILE`. The file is
|
|
22
|
+
rewritten in a fixed layout, so comments added by hand are not kept.
|
|
23
|
+
|
|
10
24
|
**Before you start**
|
|
11
25
|
|
|
12
26
|
- Use a **read-only** account. The engine only runs `SELECT` / find queries with a row limit.
|
|
@@ -14,23 +28,30 @@ opp-engine generate <source> [<source> ...] --name acme --org "Acme" -o acme.opp
|
|
|
14
28
|
and database name are kept (`postgresql://db.internal:5432/crm`).
|
|
15
29
|
- Values are sampled (200 rows or documents per table by default, `--sample N` to change) and used only
|
|
16
30
|
for classification. No value is ever written into the model, the report or the logs.
|
|
17
|
-
-
|
|
31
|
+
- Leave the password out of the URL. At a terminal the engine asks for it with hidden input, uses it
|
|
32
|
+
for the connection and forgets it. In scripts, put the whole URL in an environment variable and name
|
|
33
|
+
it with `env:`:
|
|
18
34
|
|
|
19
35
|
```bash
|
|
20
|
-
|
|
21
|
-
|
|
36
|
+
opp-engine scan postgres://reader@db.internal/crm # asks: Password for reader@db.internal
|
|
37
|
+
export CRM_URL='postgres://readonly:••••@db.internal:5432/crm'
|
|
38
|
+
opp-engine scan env:CRM_URL # for CI
|
|
22
39
|
```
|
|
23
40
|
|
|
41
|
+
`opp-engine generate SOURCE... --name N --org O -o FILE` writes a whole model from the sources named
|
|
42
|
+
in one go and takes the same sources; use it in scripts that rebuild the model from scratch.
|
|
43
|
+
|
|
24
44
|
## SQL databases
|
|
25
45
|
|
|
26
|
-
Any database with a [SQLAlchemy](https://docs.sqlalchemy.org/en/20/dialects/) dialect works.
|
|
27
|
-
|
|
46
|
+
Any database with a [SQLAlchemy](https://docs.sqlalchemy.org/en/20/dialects/) dialect works. PostgreSQL,
|
|
47
|
+
MySQL and MariaDB work after a plain install and take a plain URL; for the others, install the driver
|
|
48
|
+
next to the engine, then pass the URL. Every schema the account can read is scanned (system schemas
|
|
28
49
|
are skipped).
|
|
29
50
|
|
|
30
51
|
| Database | Install | URL format |
|
|
31
52
|
|---|---|---|
|
|
32
|
-
| PostgreSQL |
|
|
33
|
-
| MySQL / MariaDB |
|
|
53
|
+
| PostgreSQL | nothing extra | `postgres://user@host:5432/dbname` |
|
|
54
|
+
| MySQL / MariaDB | nothing extra | `mysql://user@host:3306/dbname` |
|
|
34
55
|
| SQLite | nothing extra | `sqlite:///path/to/file.db` |
|
|
35
56
|
| Microsoft SQL Server / Azure SQL | `pip install pyodbc` (and the ODBC driver) | `mssql+pyodbc://user:pass@host/dbname?driver=ODBC+Driver+18+for+SQL+Server` |
|
|
36
57
|
| Oracle | `pip install oracledb` | `oracle+oracledb://user:pass@host:1521/?service_name=ORCL` |
|
|
@@ -46,8 +67,7 @@ are skipped).
|
|
|
46
67
|
Tables become datasets of type `table`; each column becomes a field, named as in the database.
|
|
47
68
|
|
|
48
69
|
```bash
|
|
49
|
-
opp-engine
|
|
50
|
-
--name acme --org "Acme" --industry 541511 -o acme.opp.yaml --report review.md
|
|
70
|
+
opp-engine scan postgres://readonly@db.internal/crm --industry 541511 --report review.md
|
|
51
71
|
```
|
|
52
72
|
|
|
53
73
|
## NoSQL databases
|
{open_privacy_protocol_engine-0.2.0a2 → open_privacy_protocol_engine-0.2.0a3}/pyproject.toml
RENAMED
|
@@ -26,18 +26,23 @@ dependencies = [
|
|
|
26
26
|
"onnxruntime>=1.18",
|
|
27
27
|
"tokenizers>=0.19",
|
|
28
28
|
"numpy>=1.26",
|
|
29
|
+
# The common sources work after a plain install: PostgreSQL, MySQL/MariaDB, PDF and Word.
|
|
30
|
+
"psycopg[binary]>=3.1",
|
|
31
|
+
"pymysql>=1.1",
|
|
32
|
+
"pypdf>=4",
|
|
33
|
+
"python-docx>=1.1",
|
|
29
34
|
]
|
|
30
35
|
|
|
31
36
|
[project.optional-dependencies]
|
|
32
37
|
server = ["fastapi>=0.110", "uvicorn>=0.29"]
|
|
33
38
|
mcp = ["mcp>=1.2,<3"]
|
|
34
|
-
documents = ["pypdf>=4", "python-docx>=1.1"]
|
|
35
39
|
parquet = ["pyarrow>=15"]
|
|
36
|
-
# Kept for old install lines: the model runtime is now a core dependency.
|
|
37
|
-
model = []
|
|
38
|
-
postgres = ["psycopg[binary]>=3.1"]
|
|
39
40
|
mongodb = ["pymongo>=4.6"]
|
|
40
|
-
|
|
41
|
+
# Kept for old install lines: these are now core dependencies.
|
|
42
|
+
model = []
|
|
43
|
+
documents = []
|
|
44
|
+
postgres = []
|
|
45
|
+
mysql = []
|
|
41
46
|
all = ["open-privacy-protocol-engine[server,mcp,documents,parquet,model,mongodb]"]
|
|
42
47
|
test = ["pytest>=8", "httpx>=0.27", "open-privacy-protocol-engine[server,mcp,documents,model,mongodb]"]
|
|
43
48
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""opp-engine: generate OPP privacy models from any source and serve them to agents."""
|
|
2
|
-
__version__ = "0.2.
|
|
2
|
+
__version__ = "0.2.0a3"
|