Pronounced /noʊ.paɪ.wɛr/: "no-pie-wer" (as in no+ python + power)
Visit the homepage of the project: https://vfinel.github.io/nopywer/
Nopywer analyses power grids to compute current flowing through cables, 3-phase balance, and voltage drop. It also includes a cable-layout optimizer (MST + cost-based local search) exposed via a FastAPI server.
Requires Python ≥ 3.12 and uv.
uv venv
uv syncThis installs all runtime and dev dependencies (ruff, pytest, pre-commit…) in a local .venv.
Nopywer reads a GeoJSON file containing nodes and cables. A spreadsheet can optionally be provided for equipment inventory.
nopywer-analyze tests/fixtures/analyze_input.geojson -vSee nopywer-analyze --help for all options.
nopywer-analyze also reads these environment variables:
NOPYWER_INPUT: input GeoJSON pathNOPYWER_OUTPUT: output GeoJSON pathNOPYWER_INVENTORY: inventory spreadsheet path
Example:
export NOPYWER_INPUT=input.geojson
export NOPYWER_OUTPUT=output.geojson
export NOPYWER_INVENTORY=inventory.xlsx
nopywer-analyzeTo start the companion API server:
nopywer-serverOpening http://localhost:8042/ shows a minimal embedded map.
Contributions are welcome! See also CONTRIBUTING.md for guidelines on reporting bugs, suggesting features, and submitting PRs.
The project uses ruff for linting and formatting (line length: 100, see pyproject.toml for the full config).
uv run ruff check .Pre-commit hooks are configured to run ruff automatically on each commit. To install them:
uv run pre-commit installTests use pytest.
uv run pytestA GitHub Actions workflow runs on every pull request and on pushes to main/develop. It checks:
ruff check .— lintpytest— tests
If you have errors, please reach out (include the complete console output).
While efforts have been made to ensure this project's functionality, it is provided "as is" without any warranties.
