Skip to main content

extremitypathfinder

https://github.com/jannikmi/extremitypathfinder/actions/workflows/build.yml/badge.svg?branch=master documentation status https://img.shields.io/pypi/wheel/extremitypathfinder.svg pre-commit Total PyPI downloads latest version on PyPI https://img.shields.io/badge/code%20style-black-000000.svg

python package for fast geometric shortest path computation in 2D multi-polygon or grid environments based on visibility graphs.

./docs/_static/title_demo_plot.png

Supported versions

Python >=3.12,<4 is accepted; CI currently tests CPython 3.12–3.15. Dependencies are NetworkX 3.x and NumPy >=2.3.3,<3. Python <3.12 and NumPy <2.3.3 are no longer supported.

The Python and NumPy floors stay within the September 2026 downstream support window in NEP 29, now superseded by SPEC 0. Both policies exclude Python 3.11 by this date. This compatibility window is narrower than CPython’s security support lifetime. Review the floors for future releases; SPEC 0 recommends dropping Python 3.12 in October 2026. The declared dependency minimums are the same for all Python versions. On Python 3.15 they provide no wheels, so CI tests the oldest releases that do instead: NumPy 2.5.2, SciPy 1.18.1 and Numba 0.68.0. These recommendations do not promise upstream bug fixes for every included NumPy release. CI runs the full suite with minimum and latest compatible dependencies, both with and without the numba extra, on every supported Python version.

The optional numba extra installs Numba >=0.63,<1 and SciPy >=1.16.1,<2. SciPy supplies the compiled linear algebra routines. Pip selects compatible versions; Numba may constrain NumPy more tightly than the ordinary installation. Acceleration depends on Numba/llvmlite platform support and adds installation size and initial compilation time. Standard, GIL-enabled CPython is tested; free-threaded builds and alternative interpreters are not covered by CI.

Quick Guide:

Install the package with the optional Numba extra for a significant speedup:

pip install "extremitypathfinder[numba]"
from extremitypathfinder import PolygonEnvironment

# counter clockwise vertex numbering!
boundary_coordinates = [(0.0, 0.0), (10.0, 0.0), (9.0, 5.0), (10.0, 10.0), (0.0, 10.0)]
# clockwise numbering!
list_of_holes = [
    [
        (3.0, 7.0),
        (5.0, 9.0),
        (4.5, 7.0),
        (5.0, 4.0),
    ],
]
environment = PolygonEnvironment(boundary_coordinates, list_of_holes, validate=False)
start_coordinates = (4.5, 1.0)
goal_coordinates = (4.0, 8.5)
path, length = environment.find_shortest_path(start_coordinates, goal_coordinates)

Grids with blocked cells (obstacles) can be converted into polygon environments as well. Coordinates refer to the corners of the grid cells, i.e. cell (x, y) spans [x, x+1] x [y, y+1]:

size_x, size_y = 5, 3
obstacle_iter = [(2, 1), (3, 1)]  # blocked grid cells (x, y)
environment = PolygonEnvironment.from_grid(size_x, size_y, obstacle_iter)
path, length = environment.find_shortest_path((0.5, 0.5), (4.5, 2.5))

For more refer to the documentation. Upgrading from version 2.x? See the upgrade guide.

Also see: GitHub, PyPI

Metadata

Release files for extremitypathfinder 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for extremitypathfinder 3.0.0
File Size Uploaded Provenance Actions
extremitypathfinder-3.0.0.tar.gz 70.1 kB Without provenance Details for extremitypathfinder-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for extremitypathfinder 3.0.0
File Interpreter ABI Platform Actions
extremitypathfinder-3.0.0-py3-none-any.whl Python 3 none any Details for extremitypathfinder-3.0.0-py3-none-any.whl

Total release size: 108.2 kB

Release files / extremitypathfinder-3.0.0.tar.gz

Download URL extremitypathfinder-3.0.0.tar.gz
Size 70.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0485f79283e1dd477f65ee11e65235913531452350dbad3f0d51c0294e42a024
BLAKE2b-256 checksum
How to use checksums
b056e80a22a75ea5b40b27e7de8b0ced2b963a23ff4f2c286f44b0afdd5b6994
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / extremitypathfinder-3.0.0-py3-none-any.whl

Download URL extremitypathfinder-3.0.0-py3-none-any.whl
Size 38.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a26644c2a535af044c43252eec4152af6339e0e530b3ee0879cbbd54c232d42
BLAKE2b-256 checksum
How to use checksums
c223ce9c64188a51e35624cbdbe9bf82123038760a91bb3dc6e595bc529df0a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for extremitypathfinder 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page