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
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ The Python layer runs on the standard library only; the C library is loaded at r
## Requirements

- Python 3.10 or newer
- Pip 25.1 or newer
- CMake 3.16 or newer
- OpenSSL 1.1.1 or newer (development headers, e.g. `libssl-dev` on Debian/Ubuntu)
- A C compiler (gcc/clang on Linux/macOS, MSVC on Windows)
Expand Down Expand Up @@ -64,16 +65,22 @@ uv sync --group dev
Or with pip:

```bash
pip install -r requirements.txt # runtime (pure stdlib) + docs/translation tooling
pip install -r requirements-dev.txt # development: pytest (plus the above)
python -m venv .venv
# Windows:
.venv\Scripts\activate
# Linux/macOS:
source .venv/bin/activate
pip install --group dev -e .
```

## Quick start

The examples below use `uv run` for uv users; if you installed with pip instead, drop the `uv run` prefix and use `python -m` directly.

### Interactive launcher

```bash
python -m PyFlow
uv run python -m PyFlow
```

Prompts for server/client configuration, writes `setup.json`, and launches the instances.
Expand All @@ -83,13 +90,13 @@ Prompts for server/client configuration, writes `setup.json`, and launches the i
Start a server listening on `127.0.0.1:12345`:

```bash
python -m PyFlow --type 0 --setup_addr_port 127.0.0.1:12345
uv run python -m PyFlow --type 0 --setup_addr_port 127.0.0.1:12345
```

Start a client that connects to that server (and binds its own local address/port):

```bash
python -m PyFlow --type 1 --setup_addr_port 127.0.0.1:23456 --connect_addr_port 127.0.0.1:12345
uv run python -m PyFlow --type 1 --setup_addr_port 127.0.0.1:23456 --connect_addr_port 127.0.0.1:12345
```

### `setup.json`
Expand Down Expand Up @@ -120,7 +127,7 @@ By default both ends enable the encrypted channel (`is_enable_encrypto=True`): k
## Testing

```bash
pytest # full Python suite
uv run pytest # full Python suite
ctest --test-dir build # C library tests
```

Expand All @@ -131,10 +138,10 @@ The encrypted-channel tests (`test/test_crypto_rsa.py`, `test/test_crypto_tcp.py
Sphinx sources live in `docs/` (English source with `ja`/`ko`/`ru`/`zh_CN`/`zh_TW` translations). Build the HTML docs with:

```bash
python -m sphinx -b html docs build/sphinx_doc
uv run python -m sphinx -b html docs build/sphinx_doc
```

Rebuild the translations (extract gettext, machine-translate new strings, compile `.mo`) with `docs/reBuild.sh`; it needs the documentation/translation dependencies from `requirements.txt` (`sphinx`, `sphinx-intl`, `polib`, `deep-translator`).
Rebuild the translations (extract gettext, machine-translate new strings, compile `.mo`) with `docs/reBuild.sh`; it needs the documentation/translation dependencies from `pyproject.toml` (`sphinx`, `sphinx-intl`, `polib`, `deep-translator`).

## License

Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ include = ["PyFlow*"]

[dependency-groups]
dev = [
"deep-translator>=1.11.4",
"polib>=1.2.0",
"pytest>=9.0.0",
"pytest-cov>=7.1.0",
"sphinx>=8.1.3",
"sphinx-intl>=2.3.2",
]

[tool.ruff]
Expand Down
6 changes: 0 additions & 6 deletions requirements-dev.txt

This file was deleted.

22 changes: 0 additions & 22 deletions requirements.txt

This file was deleted.

Loading
Loading