docs: clarify Python bridge runtime and test behavior
This commit is contained in:
@@ -9,14 +9,14 @@ This project uses:
|
||||
- Python as the runtime backend
|
||||
- `pykeepass` to read KeePass databases
|
||||
|
||||
The TypeScript layer launches a Python bridge and exchanges JSON through stdin/stdout.
|
||||
The TypeScript layer launches a Python bridge per request and exchanges JSON through stdin/stdout.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Node.js or Bun
|
||||
- Python 3
|
||||
- `pykeepass` installed in the Python environment used by the bridge (the project provides `bun run setup:python`)
|
||||
- The bridge defaults to `.venv/bin/python3` when available, or you can override with `PYTHON_PATH`
|
||||
- The bridge defaults to `.venv/bin/python3`, or you can override with `PYTHON_PATH`
|
||||
|
||||
## Python setup
|
||||
|
||||
@@ -32,7 +32,7 @@ If you prefer manual installation:
|
||||
python3 -m venv .venv && .venv/bin/pip install pykeepass
|
||||
```
|
||||
|
||||
The bridge also works with a project-local virtual environment such as `.venv` and the tests will use it when present.
|
||||
The bridge also works with a project-local virtual environment such as `.venv`.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -62,7 +62,7 @@ bun run src/example.ts
|
||||
Creates a database wrapper.
|
||||
|
||||
#### Options
|
||||
- `password`: KeePass master password, read from the fixture JSON in examples/tests when applicable
|
||||
- `password`: KeePass master password
|
||||
- `keyFile`: optional key file path
|
||||
|
||||
### `listEntries()`
|
||||
@@ -81,7 +81,7 @@ No-op for now.
|
||||
|
||||
- The bridge currently launches a Python process per call.
|
||||
- This is simple and robust for a first version.
|
||||
- Errors from the Python bridge are propagated to the TypeScript API with the bridge exit code when available.
|
||||
- Errors from the Python bridge are propagated to the TypeScript API, including invalid or empty output.
|
||||
- A persistent Python process can be added later if needed.
|
||||
- Bundled fixtures include `tests/fixtures/data.kdbx` and `tests/fixtures/empty.kdbx`; their companion JSON files store the password and expected content for tests/examples.
|
||||
- Integration tests validate the bundled `data.kdbx` entry-by-entry and group-by-group against `tests/fixtures/data.kdbx.json`.
|
||||
- Bundled fixtures include `tests/fixtures/data.kdbx` and `tests/fixtures/empty.kdbx`; the companion JSON file stores the password and expected content for tests/examples.
|
||||
- Integration tests validate the bundled `data.kdbx` entry-by-entry and group-by-group against `tests/fixtures/data.kdbx.json`, and may skip cleanly when `pykeepass` is unavailable.
|
||||
|
||||
Reference in New Issue
Block a user