PyPaths is a small library useful for computing paths across simple in-memory graphs. Try it out by installing with pip:
> pip install pypaths
Or, alternatively, install from source:
> git clone https://github.com/jonathanhood/pypaths.git > cd pypaths > python setup.py install
For the simplest default case, usage is very simple:
from pypaths import astar
finder = astar.pathfinder()
print finder( (0,0), (2,2) )
We can also provide some parameters to help the algoriths understand your specific graph:
from pypaths import astar
finder = astar.pathfinder(
distance=my_distance_function, # Calculate the absolute distance between two nodes
cost=my_cost_function, # Calculate the heuristic cost between nodes
neighbors=my_neighbors_function) # Calculate the list of neighbors for a given node
print finder( "MY NODE 1", "MY NODE 3" )
Metadata
Release files for pypaths 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pypaths-0.1.2.tar.gz | 3.1 kB | Without provenance | Details |
Release files / pypaths-0.1.2.tar.gz
| Download URL | pypaths-0.1.2.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18b30c92b09f1181ad6a97c57796e16f74afcfa2556c06870212c68aec387af7
|
|
BLAKE2b-256 checksum How to use checksums |
63a9a154407906f0086385519c8cddaa9bad371f3b802ea2bb43939aa78b22b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pypaths 0.1.2
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.