Skip to main content

Graph traversal & pathfinding (informed and uninformed search) with a Rust core

Project description

graphfinder (Python)

Graph traversal & pathfinding (informed and uninformed search) with a Rust core.

import graphfinder as gf

# A* on a maze
r = gf.search(gf.sample_maze("wall"), algorithm="astar", heuristic="manhattan")
print(r)                     # SearchResult(found=True, cost=20, expanded=25, ...)
print(r.cost, r.nodes_expanded, len(r.trace))

# Explicit weighted graph from a generator
edges = gf.gen_barabasi_albert(200, 3, seed=1)
r = gf.search_graph(200, edges, start=0, goal=199, algorithm="bidirectional")

# Implicit graph (lazy successors; states are ints or tuples of ints)
def successors(s):
    return [(s + 1, 1.0), (s * 2, 1.0)] if s < 1000 else []
r = gf.search(successors, start=1, goal=27, algorithm="bfs")

Build from source (Rust core via maturin):

pip install maturin
maturin develop --release
python examples/quickstart.py

See the top-level README and ROADMAP.md for the full feature list. A visualization layer (graphfinder.viz) is planned for Phase 4.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphfinder-0.4.0.tar.gz (38.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

graphfinder-0.4.0-cp39-abi3-win_amd64.whl (290.8 kB view details)

Uploaded CPython 3.9+Windows x86-64

graphfinder-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (438.3 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

graphfinder-0.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (415.4 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

graphfinder-0.4.0-cp39-abi3-macosx_11_0_arm64.whl (376.2 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

graphfinder-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl (391.9 kB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file graphfinder-0.4.0.tar.gz.

File metadata

  • Download URL: graphfinder-0.4.0.tar.gz
  • Upload date:
  • Size: 38.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for graphfinder-0.4.0.tar.gz
Algorithm Hash digest
SHA256 3bd754658051050fd58829a7c0964828fbc10ab78f13c9ea2141aabe973fd3d9
MD5 6be62ec57bcdb188cf858805c8ee71c0
BLAKE2b-256 eb1f4f0e6aebdebb828cdc06cc68de2ad2127fc02adb521adbed2e8c1b0ab421

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphfinder-0.4.0.tar.gz:

Publisher: release-pypi.yml on graphfinder/graphfinder.github.io

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file graphfinder-0.4.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: graphfinder-0.4.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 290.8 kB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for graphfinder-0.4.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 20ca17289c47ba57fcd2ecd7079393427857907822f0c42c5ae5bc2a8f575f5c
MD5 c78d90fb94e493a9062685b9090f7d80
BLAKE2b-256 6d8265fc3bea4351eb0bebef3d09bb0e49e3110aedacfbd6a6f730e68a11f946

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphfinder-0.4.0-cp39-abi3-win_amd64.whl:

Publisher: release-pypi.yml on graphfinder/graphfinder.github.io

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file graphfinder-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for graphfinder-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 da344f93254069fdfeed585b942f11f8f8b029586934caadd5a1d89b082c86b1
MD5 48d8b15a1541bf885dfd2707bd6f17a4
BLAKE2b-256 69924fc446f32f964a429fdf31e611fb87e4311b67e9ec793039e963d33cd78a

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphfinder-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release-pypi.yml on graphfinder/graphfinder.github.io

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file graphfinder-0.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for graphfinder-0.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 82778244ae8b042872d92e3b96c2fb8e7d895f4d616d7fe45d3eacba6ceecfc6
MD5 2d2f809ae414ddd068bb64a9a8d918f6
BLAKE2b-256 411324d59b82115c4c361d99b1ad041e3a185a3baba2f92b87ac3adddd88a919

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphfinder-0.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release-pypi.yml on graphfinder/graphfinder.github.io

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file graphfinder-0.4.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for graphfinder-0.4.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 513efab6190e11e4e25f5d1e7cc6b301c76bdcbf9f75eaf0e7c29d14a6455374
MD5 5bfa1bb0679d3018852b12888c0b94cd
BLAKE2b-256 cda85f99cf5f5da6746b123912c7afe36167f26da7009dced99e3d9a3da28e77

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphfinder-0.4.0-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: release-pypi.yml on graphfinder/graphfinder.github.io

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file graphfinder-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for graphfinder-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c1dafdf34dec4579ae416df660a575ef15bd22945d9026bc0582901b81f17d16
MD5 62617a5458795afeb933f3aedddc2520
BLAKE2b-256 4013fb8cddea9540796a1fd141ec1a1d77b75df8eb3808d15b0b4edfbd211de7

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphfinder-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: release-pypi.yml on graphfinder/graphfinder.github.io

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page