scgraph


Namescgraph JSON
Version 2.13.0 PyPI version JSON
download
home_pageNone
SummaryDetermine an approximate route between two points on earth.
upload_time2025-08-29 13:54:56
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SCGraph
[![PyPI version](https://badge.fury.io/py/scgraph.svg)](https://badge.fury.io/py/scgraph)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PyPI Downloads](https://img.shields.io/pypi/dm/scgraph.svg?label=PyPI%20downloads)](https://pypi.org/project/scgraph/)
<!-- [![PyPI Downloads](https://pepy.tech/badge/scgraph)](https://pypi.org/project/scgraph/) -->


### A Supply chain graph package for Python


![scgraph](https://raw.githubusercontent.com/connor-makowski/scgraph/main/static/scgraph.png)

## Quick Start:
Get the shortest maritime path length between Shanghai, China and Savannah, Georgia, USA
```py
# Use a maritime network geograph
from scgraph.geographs.marnet import marnet_geograph
output = marnet_geograph.get_shortest_path(
    origin_node={"latitude": 31.23,"longitude": 121.47},
    destination_node={"latitude": 32.08,"longitude": -81.09},
    output_units='km',
)
print('Length: ',output['length']) #=> Length:  19596.4653
```

### Documentation

- Docs: https://connor-makowski.github.io/scgraph/scgraph.html
- Git Repo: https://github.com/connor-makowski/scgraph
- Paper: https://ssrn.com/abstract=5388845

### How to Cite SCGraph in your Research

If you use SCGraph for your research, please consider citing the following paper:

> Makowski, C., Saragih, A., Guter, W., Russell, T., Heinold, A., & Lekkakos, S. (2025). SCGraph: A dependency-free Python package for road, rail, and maritime shortest path routing generation and distance estimation. MIT Center for Transportation & Logistics Research Paper Series, (2025-028). https://ssrn.com/abstract=5388845

Or by using the BibTeX entry:

```
@article{makowski2025scgraph,
  title={SCGraph: A Dependency-Free Python Package for Road, Rail, and Maritime Shortest Path Routing Generation and Distance Estimation},
  author={Makowski, Connor and Saragih, Austin and Guter, Willem and Russell, Tim and Heinold, Arne and Lekkakos, Spyridon},
  journal={MIT Center for Transportation \& Logistics Research Paper Series},
  number={2025-028},
  year={2025},
  url={https://ssrn.com/abstract=5388845}
}
```

# Getting Started

## Installation

```
pip install scgraph
```

## Basic Geograph Usage

Get the shortest path between two points on earth using a latitude / longitude pair.

In this case, calculate the shortest maritime path between Shanghai, China and Savannah, Georgia, USA.

```py
# Use a maritime network geograph
from scgraph.geographs.marnet import marnet_geograph

# Note: The origin and destination nodes can be any latitude / longitude pair
output = marnet_geograph.get_shortest_path(
    origin_node={"latitude": 31.23,"longitude": 121.47},
    destination_node={"latitude": 32.08,"longitude": -81.09},
    output_units='km',
    # Optional: Cache the origin node's spanning tree for faster calculations on future calls from the same origin node when cache=True
    # Note: This will make the first call slower, but future calls using this origin node will be substantially faster.
    cache=True,
)
print('Length: ',output['length']) #=> Length:  19596.4653
```

Adding in a few additional parameters to the `get_shortest_path` function can change the output format as well as performance of the calculation.
```py
# Use a maritime network geograph
from scgraph.geographs.marnet import marnet_geograph

# Get the shortest maritime path between Shanghai, China and Savannah, Georgia, USA
output = marnet_geograph.get_shortest_path(
    origin_node={"latitude": 31.23,"longitude": 121.47},
    destination_node={"latitude": 32.08,"longitude": -81.09},
    output_units='km',
    node_addition_lat_lon_bound=180, # Optional: The maximum distance in degrees to consider nodes when attempting to add the origin and destination nodes to the graph
    node_addition_type='quadrant', # Optional: Instead of connecting the origin node to the graph by the closest node, connect it to the closest node in each direction (NE, NW, SE, SW) if found within the node_addition_lat_lon_bound
    destination_node_addition_type='all', # Optional: Instead of connecting the destination node to the graph by the closest node, connect it to all nodes found within the node_addition_lat_lon_bound
    # When destination_node_addition_type='all' is set with a node_addition_lat_lon_bound=180, this will guarantee a solution can be found since the destination node will also connect to the origin node
)
print('Length: ',output['length']) #=> Length:  19596.4653
```

In the above example, the `output` variable is a dictionary with two keys: `length` and `coordinate_path`.

- `length`: The distance between the passed origin and destination when traversing the graph along the shortest path
    - Notes:
        - This will be in the units specified by the `output_units` parameter.
        - `output_units` options:
            - `km` (kilometers - default)
            - `m` (meters)
            - `mi` (miles)
            - `ft` (feet)
- `coordinate_path`: A list of lists [`latitude`,`longitude`] that make up the shortest path


You can also select a different algorithm function for the shortest_path:
```py
from scgraph.geographs.marnet import marnet_geograph
from scgraph import Graph
output = marnet_geograph.get_shortest_path(
    origin_node={"latitude": 31.23,"longitude": 121.47},
    destination_node={"latitude": 32.08,"longitude": -81.09},
    # Optional: Specify an algorithm_fn to call when solving the shortest_path
    algorithm_fn=Graph.bmssp,
)
```

Don't neglect the very efficient distance matrix function to quickly get the distances between multiple points on the graph. Each origin graph entry point and spanning tree is cached so you can generate massive distance matricies incredibly quickly (approaching 50 nano seconds per distance for large enough distance matricies).
```py
from scgraph.geographs.us_freeway import us_freeway_geograph

cities = [
    {"latitude": 34.0522, "longitude": -118.2437},  # Los Angeles
    {"latitude": 40.7128, "longitude": -74.0060},   # New York City
    {"latitude": 41.8781, "longitude": -87.6298},   # Chicago
    {"latitude": 29.7604, "longitude": -95.3698},   # Houston
]

distance_matrix = us_freeway_geograph.distance_matrix(cities, output_units='km')
# [
#  [0.0, 4510.965665644833, 3270.3864033755776, 2502.886438995942],
#  [4510.9656656448415, 0.0, 1288.473118634311, 2637.5821542546687],
#  [3270.3864033755744, 1288.4731186343113, 0.0, 1913.1928919854067],
#  [2502.886438995935, 2637.5821542546687, 1913.1928919854076, 0.0],
# ]
```

For more examples including viewing the output on a map, see the [example notebook](https://colab.research.google.com/github/connor-makowski/scgraph/blob/main/examples/getting_started.ipynb).


### Examples with Google Colab

- [Getting Started](https://colab.research.google.com/github/connor-makowski/scgraph/blob/main/examples/getting_started.ipynb)
- [Creating A Multi Path Geojson](https://colab.research.google.com/github/connor-makowski/scgraph/blob/main/examples/multi_path_geojson.ipynb)
- [Modifying A Geograph](https://colab.research.google.com/github/connor-makowski/scgraph/blob/main/examples/geograph_modifications.ipynb)

## GridGraph usage

Example:
- Create a grid of 20x20 cells.
    - This creates a grid based graph with connections to all 8 neighbors for each grid item.
    - Each grid item has 4 cardinal connections at length 1 and 4 diagonal connections at length sqrt(2)
- Create a wall from (10,5) to (10,19).
    - This would foce any path to go to the bottom of the graph to get around the wall.
- Get the shortest path between (2,10) and (18,10)
    - Note: The length of this path should be 16 without the wall and 20.9704 with the wall.

```py
from scgraph import GridGraph

x_size = 20
y_size = 20
blocks = [(10, i) for i in range(5, y_size)]

# Create the GridGraph object
gridGraph = GridGraph(
    x_size=x_size,
    y_size=y_size,
    blocks=blocks,
    add_exterior_walls=True,
)

# Solve the shortest path between two points
output = gridGraph.get_shortest_path(
    origin_node={"x": 2, "y": 10},
    destination_node={"x": 18, "y": 10},
    # Optional: Specify the output coodinate format (default is 'list_of_dicts)
    output_coordinate_path="list_of_lists",
    # Optional: Cache the origin point spanning_tree for faster calculations on future calls
    cache=True,
)

print(output)
#=> {'length': 20.9704, 'coordinate_path': [[2, 10], [3, 9], [4, 8], [5, 8], [6, 7], [7, 6], [8, 5], [9, 4], [10, 4], [11, 4], [12, 5], [13, 6], [14, 7], [15, 7], [16, 8], [17, 9], [18, 10]]}
```


# About
## Key Features

- `Graph`:
    - A low level graph object that has methods for validating graphs, calculating shortest paths, and more.
    - See: [Graph Documentation](https://connor-makowski.github.io/scgraph/scgraph/graph.html)
    - Contains the following methods:
        - `validate_graph`: Validates symmetry and connectedness of a graph.
        - `dijkstra`: Calculates the shortest path between two nodes using Dijkstra's algorithm.
        - `dijkstra_makowski`: Calculates the shortest path between two nodes using a modified version of Dijkstra's algorithm designed for real world performance
        - `dijkstra_negative`: Calculates the shortest path between two nodes using a modified version of Dijkstra's algorithm that supports negative edge weights and detects negative cycles.
        - `a_star`: Modified version of `dijkstra_makowski` that incorporates a heuristic function to guide the search.
        - `bellman_ford`: Calculates the shortest path between two nodes using the Bellman-Ford algorithm.
        - `bmssp`: Calculates the shortest path between two nodes using a modified version of the [BMSSP Algorithm](https://arxiv.org/pdf/2504.17033). See the [BmsspSolver](https://connor-makowski.github.io/scgraph/scgraph/bmssp.html).
- `GeoGraph`s:
    - A geographic graph data structure that allows for the calculation of shortest paths between two points on earth
    - Uses latitude / longitude pairs to represent points on earth
    - Supports maritime, rail, road and other geographic networks
    - Uses a sparse network data structure to represent the graph
    - How to use it - Calculate the shortest path between two points on earth
        - Inputs:
            - A latitude / longitude pair for the origin
            - A latitude / longitude pair for the destination
        - Calculation:
            - See the `Graph` documentation above for available algorithms.
        - Returns:
            - `path`:
                - A list of lists `[latitude, longitude]` that make up the shortest path
            - `length`:
                - The distance (in the units requested) between the two points
    - Precompiled Geographs offer Antimeridian support
    - Arbitrary start and end points are supported
        - Start and end points do not need to be in the graph
    - Cached shortest path calculations can be used for very fast repetative calculations from the same origin node in a GeoGraph.
        - This is done by caching the origin node's spanning tree
        - The first call will be slower, but future calls using this origin node will be substantially faster.
- `GridGraph`s:
    - A grid based graph data structure that allows for the calculation of shortest paths between two points on a grid
    - See: [GridGraph Documentation](https://connor-makowski.github.io/scgraph/scgraph/grid.html)
    - Supports arbitrary grid sizes and blockages
    - Uses a sparse network data structure to represent the graph
    - How to use it - Calculate the shortest path between two points on a grid
        - Inputs:
            - A (x,y) coordinate on the grid for the origin
            - A (x,y) coordinate on the grid for the destination
        - Calculation:
            - Algorithms:
                - Dijkstra's algorithm
                - Modified Dijkstra algorithm
                - A* algorithm (Extension of the Modified Dijkstra)
        - Returns:
            - `length`:
                - The distance between the two points on the grid
            - `coordinate_path`:
                - A list of dicts `{"x": x, "y": y}` representing the path taken through the grid
    - Arbitrary start and end points are supported
        - Start and end points do not need to be in the graph
    - Arbitrary connection matricies are supported
        - Cardinal connections (up, down, left, right) and diagonal connections (up-left, up-right, down-left, down-right) are used by default
        - Custom connection matricies can be used to change the connections between grid items
    - Cached shortest path calculations can be used for very fast repetative calculations to or from the same point in a GridGraph.
- Other Useful Features:
    - `CacheGraph`s:
        - A graph extension that caches spanning trees for fast shortest path calculations on repeat calls from the same origin node
        - See: [CacheGraphs Documentation](https://connor-makowski.github.io/scgraph/scgraph/cache.html)
    - `SpanningTree`s:
        - See: [Spanning Trees Documentation](https://connor-makowski.github.io/scgraph/scgraph/spanning.html)

## Included GeoGraphs

- marnet_geograph:
    - What: A maritime network data set from searoute
    - Use: `from scgraph.geographs.marnet import marnet_geograph`
    - Attribution: [searoute](https://github.com/genthalili/searoute-py)
    - Length Measurement: Kilometers
    - [Marnet Picture](https://raw.githubusercontent.com/connor-makowski/scgraph/main/static/marnet.png)
- oak_ridge_maritime_geograph:
    - What: A maritime data set from the Oak Ridge National Laboratory campus
    - Use: `from scgraph.geographs.oak_ridge_maritime import oak_ridge_maritime_geograph`
    - Attribution: [Oak Ridge National Laboratory](https://www.ornl.gov/) with data from [Geocommons](http://geocommons.com/datasets?id=25)
    - Length Measurement: Kilometers
    - [Oak Ridge Maritime Picture](https://raw.githubusercontent.com/connor-makowski/scgraph/main/static/oak_ridge_maritime.png)
- north_america_rail_geograph:
    - What: Class 1 Rail network for North America
    - Use: `from scgraph.geographs.north_america_rail import north_america_rail_geograph`
    - Attribution: [U.S. Department of Transportation: ArcGIS Online](https://geodata.bts.gov/datasets/usdot::north-american-rail-network-lines-class-i-freight-railroads-view/about)
    - Length Measurement: Kilometers
    - [North America Rail Picture](https://raw.githubusercontent.com/connor-makowski/scgraph/main/static/north_america_rail.png)
- us_freeway_geograph:
    - What: Freeway network for the United States
    - Use: `from scgraph.geographs.us_freeway import us_freeway_geograph`
    - Attribution: [U.S. Department of Transportation: ArcGIS Online](https://hub.arcgis.com/datasets/esri::usa-freeway-system-over-1500k/about)
    - Length Measurement: Kilometers
    - [US Freeway Picture](https://raw.githubusercontent.com/connor-makowski/scgraph/main/static/us_freeway.png)
- `scgraph_data` geographs:
    - What: Additional geographs are available in the `scgraph_data` package
        - Note: These include larger geographs like the world highways geograph and world railways geograph.
    - Installation: `pip install scgraph_data`
    - Use: `from scgraph_data.world_highways import world_highways_geograph`
    - See: [scgraph_data](https://github.com/connor-makowski/scgraph_data) for more information and all available geographs.
- Custom Geographs:
    - What: Users can create their own geographs from various data sources
    - See: [Building your own Geographs from Open Source Data](https://github.com/connor-makowski/scgraph#building-your-own-geographs-from-open-source-data)

# Advanced Usage

## Using scgraph_data geographs

Using `scgraph_data` geographs:
- Note: Make sure to install the `scgraph_data` package before using these geographs
```py
from scgraph_data.world_railways import world_railways_geograph
from scgraph import Graph

# Get the shortest path between Kalamazoo Michigan and Detroit Michigan by Train
output = world_railways_geograph.get_shortest_path(
    origin_node={"latitude": 42.29,"longitude": -85.58},
    destination_node={"latitude": 42.33,"longitude": -83.05},
    # Optional: Use the A* algorithm
    algorithm_fn=Graph.a_star,
    # Optional: Pass the haversine function as the heuristic function to the A* algorithm
    algorithm_kwargs={"heuristic_fn": world_railways_geograph.haversine},
)
```

## Building your own Geographs from Open Source Data
You can build your own geographs using various tools and data sources. For example, you can use OpenStreetMap data to create a high fidelity geograph for a specific area.

Follow this step by step guide on how to create a geograph from OpenStreetMap data.
For this example, we will use some various tools to create a geograph for highways (including seconday highways) in Michigan, USA.

Download an OSM PBF file using the AWS CLI:
- Geofabrik is a good source for smaller OSM PBF files. See: https://download.geofabrik.de/
- To keep things generalizable, you can also download the entire planet OSM PBF file using AWS. But you should consider downloading a smaller region if you are only interested in a specific area.
    - Note: For this, you will need to install the AWS CLI.
    - Note: The planet OSM PBF file is very large (About 100GB)
        ```
        aws s3 cp s3://osm-pds/planet-latest.osm.pbf .
        ```
- Use Osmium to filter and extract the highways from the OSM PBF file.
    - Install osmium on macOS:
        ```
        brew install osmium-tool
        ```
    - Install osmium on Ubuntu:
        ```
        sudo apt-get install osmium-tool
        ```
- Download a Poly file for the area you are interested in. This is a polygon file that defines the area you want to extract from the OSM PBF file.
    - For Michigan, you can download the poly file from Geofabrik:
        ```
        curl https://download.geofabrik.de/north-america/us/michigan.poly > michigan.poly
        ```
    - Google around to find an appropriate poly file for your area of interest.
- Filter and extract as GeoJSON (EG: Michigan) substituting the poly and pbf file names as needed:
    ```
    osmium extract -p michigan.poly --overwrite -o michigan.osm.pbf planet-latest.osm.pbf
    ```
- Filter the OSM PBF file to only areas of interest and export to GeoJSON:
    - See: https://wiki.openstreetmap.org/wiki/
    - EG For Highways, see: https://wiki.openstreetmap.org/wiki/Key:highway
    ```
    osmium tags-filter michigan.osm.pbf w/highway=motorway,trunk,primary,motorway_link,trunk_link,primary_link,secondary,secondary_link,tertiary,tertiary_link -t --overwrite -o michigan_roads.osm.pbf
    osmium export michigan_roads.osm.pbf -f geojson --overwrite -o michigan_roads.geojson
    ```

- Simplify the geojson
    - This uses some tools in the SCGraph library as well as Mapshaper to simplify the geojson files.
    - Mapshaper is a CLI and web tool for simplifying and editing geojson files.
    - To install Mapshaper for CLI use, use NPM:
        ```
        npm install -g mapshaper
        ```
    - Mapshaper is particularly helpful since it repairs intersections in the lines which is crutial for geographs to work properly.
    - Mapshaper, however, does not handle larger files very well, so it is recommended to simplify the geojson file first using the `scgraph.helpers.geojson.simplify_geojson` function first to reduce the size of the file.
    - Make sure to tailor the parameters to your needs.
    ```
    python -c "from scgraph.helpers.geojson import simplify_geojson; simplify_geojson('michigan_roads.geojson', 'michigan_roads_simple.geojson', precision=4, pct_to_keep=100, min_points=3, silent=False)"
    mapshaper michigan_roads_simple.geojson -simplify 10% -filter-fields -o force michigan_roads_simple.geojson
    mapshaper michigan_roads_simple.geojson -snap -clean -o force michigan_roads_simple.geojson
    ```
- Load the newly created geojson file as a geograph:
    - Note: The `GeoGraph.load_from_geojson` function is used to load the geojson file as a geograph.
    - This will create a geograph that can be used to calculate shortest paths between points on the graph.
    ```
    from scgraph import GeoGraph
    michigan_roads_geograph = GeoGraph.load_from_geojson('michigan_roads_simple.geojson')
    ```

## Custom Graphs and Geographs
Modify an existing geograph: See the notebook [here](https://colab.research.google.com/github/connor-makowski/scgraph/blob/main/examples/geograph_modifications.ipynb)


You can specify your own custom graphs for direct access to the solving algorithms. This requires the use of the low level `Graph` class

```py
from scgraph import Graph

# Define an arbitrary graph
# See the graph definitions here:
# https://connor-makowski.github.io/scgraph/scgraph/graph.html#Graph.validate_graph
graph = [
    {1: 5, 2: 1},
    {0: 5, 2: 2, 3: 1},
    {0: 1, 1: 2, 3: 4, 4: 8},
    {1: 1, 2: 4, 4: 3, 5: 6},
    {2: 8, 3: 3},
    {3: 6}
]

# Optional: Validate your graph
Graph.validate_graph(graph=graph)

# Get the shortest path between idx 0 and idx 5
output = Graph.dijkstra_makowski(graph=graph, origin_id=0, destination_id=5)
#=> {'path': [0, 2, 1, 3, 5], 'length': 10}
```

You can also use a slightly higher level `GeoGraph` class to work with latitude / longitude pairs

```py
from scgraph import GeoGraph

# Define nodes
# See the nodes definitions here:
# https://connor-makowski.github.io/scgraph/scgraph/geograph.html#GeoGraph.__init__
nodes = [
    # London
    [51.5074, -0.1278],
    # Paris
    [48.8566, 2.3522],
    # Berlin
    [52.5200, 13.4050],
    # Rome
    [41.9028, 12.4964],
    # Madrid
    [40.4168, -3.7038],
    # Lisbon
    [38.7223, -9.1393]
]
# Define a graph
# See the graph definitions here:
# https://connor-makowski.github.io/scgraph/scgraph/graph.html#Graph.validate_graph
graph = [
    # From London
    {
        # To Paris
        1: 311,
    },
    # From Paris
    {
        # To London
        0: 311,
        # To Berlin
        2: 878,
        # To Rome
        3: 1439,
        # To Madrid
        4: 1053
    },
    # From Berlin
    {
        # To Paris
        1: 878,
        # To Rome
        3: 1181,
    },
    # From Rome
    {
        # To Paris
        1: 1439,
        # To Berlin
        2: 1181,
    },
    # From Madrid
    {
        # To Paris
        1: 1053,
        # To Lisbon
        5: 623
    },
    # From Lisbon
    {
        # To Madrid
        4: 623
    }
]

# Create a GeoGraph object
my_geograph = GeoGraph(nodes=nodes, graph=graph)

# Optional: Validate your graph
my_geograph.validate_graph()

# Optional: Validate your nodes
my_geograph.validate_nodes()

# Get the shortest path between two points
# In this case, Birmingham England and Zaragoza Spain
# Since Birmingham and Zaragoza are not in the graph,
# the algorithm will add them into the graph.
# See: https://connor-makowski.github.io/scgraph/scgraph/geograph.html#GeoGraph.get_shortest_path
# Expected output would be to go from
# Birmingham -> London -> Paris -> Madrid -> Zaragoza

output = my_geograph.get_shortest_path(
    # Birmingham England
    origin_node = {'latitude': 52.4862, 'longitude': -1.8904},
    # Zaragoza Spain
    destination_node = {'latitude': 41.6488, 'longitude': -0.8891}
)
print(output)
# {
#     'length': 1799.4323,
#     'coordinate_path': [
#         [52.4862, -1.8904],
#         [51.5074, -0.1278],
#         [48.8566, 2.3522],
#         [40.4168, -3.7038],
#         [41.6488, -0.8891]
#     ]
# }

```

# Development
## Running Tests, Prettifying Code, and Updating Docs

Make sure Docker is installed and running on a Unix system (Linux, MacOS, WSL2).

- Create a docker container and drop into a shell
    - `./run.sh`
- Run all tests (see ./utils/test.sh)
    - `./run.sh test`
- Prettify the code (see ./utils/prettify.sh)
    - `./run.sh prettify`
- Update the docs (see ./utils/docs.sh)
    - `./run.sh docs`

- Note: You can and should modify the `Dockerfile` to test different python versions.


## Attributions and Thanks
Originally inspired by [searoute](https://github.com/genthalili/searoute-py) including the use of one of their [datasets](https://github.com/genthalili/searoute-py/blob/main/searoute/data/marnet_densified_v2_old.geojson) that has been modified to work properly with this package.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "scgraph",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Connor Makowski <conmak@mit.edu>",
    "download_url": "https://files.pythonhosted.org/packages/7b/39/8abf20f2c7453ebfad8306cb4b8f1fc25b6220a1bb484c8b52408e4dfc67/scgraph-2.13.0.tar.gz",
    "platform": null,
    "description": "# SCGraph\n[![PyPI version](https://badge.fury.io/py/scgraph.svg)](https://badge.fury.io/py/scgraph)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![PyPI Downloads](https://img.shields.io/pypi/dm/scgraph.svg?label=PyPI%20downloads)](https://pypi.org/project/scgraph/)\n<!-- [![PyPI Downloads](https://pepy.tech/badge/scgraph)](https://pypi.org/project/scgraph/) -->\n\n\n### A Supply chain graph package for Python\n\n\n![scgraph](https://raw.githubusercontent.com/connor-makowski/scgraph/main/static/scgraph.png)\n\n## Quick Start:\nGet the shortest maritime path length between Shanghai, China and Savannah, Georgia, USA\n```py\n# Use a maritime network geograph\nfrom scgraph.geographs.marnet import marnet_geograph\noutput = marnet_geograph.get_shortest_path(\n    origin_node={\"latitude\": 31.23,\"longitude\": 121.47},\n    destination_node={\"latitude\": 32.08,\"longitude\": -81.09},\n    output_units='km',\n)\nprint('Length: ',output['length']) #=> Length:  19596.4653\n```\n\n### Documentation\n\n- Docs: https://connor-makowski.github.io/scgraph/scgraph.html\n- Git Repo: https://github.com/connor-makowski/scgraph\n- Paper: https://ssrn.com/abstract=5388845\n\n### How to Cite SCGraph in your Research\n\nIf you use SCGraph for your research, please consider citing the following paper:\n\n> Makowski, C., Saragih, A., Guter, W., Russell, T., Heinold, A., & Lekkakos, S. (2025). SCGraph: A dependency-free Python package for road, rail, and maritime shortest path routing generation and distance estimation. MIT Center for Transportation & Logistics Research Paper Series, (2025-028). https://ssrn.com/abstract=5388845\n\nOr by using the BibTeX entry:\n\n```\n@article{makowski2025scgraph,\n  title={SCGraph: A Dependency-Free Python Package for Road, Rail, and Maritime Shortest Path Routing Generation and Distance Estimation},\n  author={Makowski, Connor and Saragih, Austin and Guter, Willem and Russell, Tim and Heinold, Arne and Lekkakos, Spyridon},\n  journal={MIT Center for Transportation \\& Logistics Research Paper Series},\n  number={2025-028},\n  year={2025},\n  url={https://ssrn.com/abstract=5388845}\n}\n```\n\n# Getting Started\n\n## Installation\n\n```\npip install scgraph\n```\n\n## Basic Geograph Usage\n\nGet the shortest path between two points on earth using a latitude / longitude pair.\n\nIn this case, calculate the shortest maritime path between Shanghai, China and Savannah, Georgia, USA.\n\n```py\n# Use a maritime network geograph\nfrom scgraph.geographs.marnet import marnet_geograph\n\n# Note: The origin and destination nodes can be any latitude / longitude pair\noutput = marnet_geograph.get_shortest_path(\n    origin_node={\"latitude\": 31.23,\"longitude\": 121.47},\n    destination_node={\"latitude\": 32.08,\"longitude\": -81.09},\n    output_units='km',\n    # Optional: Cache the origin node's spanning tree for faster calculations on future calls from the same origin node when cache=True\n    # Note: This will make the first call slower, but future calls using this origin node will be substantially faster.\n    cache=True,\n)\nprint('Length: ',output['length']) #=> Length:  19596.4653\n```\n\nAdding in a few additional parameters to the `get_shortest_path` function can change the output format as well as performance of the calculation.\n```py\n# Use a maritime network geograph\nfrom scgraph.geographs.marnet import marnet_geograph\n\n# Get the shortest maritime path between Shanghai, China and Savannah, Georgia, USA\noutput = marnet_geograph.get_shortest_path(\n    origin_node={\"latitude\": 31.23,\"longitude\": 121.47},\n    destination_node={\"latitude\": 32.08,\"longitude\": -81.09},\n    output_units='km',\n    node_addition_lat_lon_bound=180, # Optional: The maximum distance in degrees to consider nodes when attempting to add the origin and destination nodes to the graph\n    node_addition_type='quadrant', # Optional: Instead of connecting the origin node to the graph by the closest node, connect it to the closest node in each direction (NE, NW, SE, SW) if found within the node_addition_lat_lon_bound\n    destination_node_addition_type='all', # Optional: Instead of connecting the destination node to the graph by the closest node, connect it to all nodes found within the node_addition_lat_lon_bound\n    # When destination_node_addition_type='all' is set with a node_addition_lat_lon_bound=180, this will guarantee a solution can be found since the destination node will also connect to the origin node\n)\nprint('Length: ',output['length']) #=> Length:  19596.4653\n```\n\nIn the above example, the `output` variable is a dictionary with two keys: `length` and `coordinate_path`.\n\n- `length`: The distance between the passed origin and destination when traversing the graph along the shortest path\n    - Notes:\n        - This will be in the units specified by the `output_units` parameter.\n        - `output_units` options:\n            - `km` (kilometers - default)\n            - `m` (meters)\n            - `mi` (miles)\n            - `ft` (feet)\n- `coordinate_path`: A list of lists [`latitude`,`longitude`] that make up the shortest path\n\n\nYou can also select a different algorithm function for the shortest_path:\n```py\nfrom scgraph.geographs.marnet import marnet_geograph\nfrom scgraph import Graph\noutput = marnet_geograph.get_shortest_path(\n    origin_node={\"latitude\": 31.23,\"longitude\": 121.47},\n    destination_node={\"latitude\": 32.08,\"longitude\": -81.09},\n    # Optional: Specify an algorithm_fn to call when solving the shortest_path\n    algorithm_fn=Graph.bmssp,\n)\n```\n\nDon't neglect the very efficient distance matrix function to quickly get the distances between multiple points on the graph. Each origin graph entry point and spanning tree is cached so you can generate massive distance matricies incredibly quickly (approaching 50 nano seconds per distance for large enough distance matricies).\n```py\nfrom scgraph.geographs.us_freeway import us_freeway_geograph\n\ncities = [\n    {\"latitude\": 34.0522, \"longitude\": -118.2437},  # Los Angeles\n    {\"latitude\": 40.7128, \"longitude\": -74.0060},   # New York City\n    {\"latitude\": 41.8781, \"longitude\": -87.6298},   # Chicago\n    {\"latitude\": 29.7604, \"longitude\": -95.3698},   # Houston\n]\n\ndistance_matrix = us_freeway_geograph.distance_matrix(cities, output_units='km')\n# [\n#  [0.0, 4510.965665644833, 3270.3864033755776, 2502.886438995942],\n#  [4510.9656656448415, 0.0, 1288.473118634311, 2637.5821542546687],\n#  [3270.3864033755744, 1288.4731186343113, 0.0, 1913.1928919854067],\n#  [2502.886438995935, 2637.5821542546687, 1913.1928919854076, 0.0],\n# ]\n```\n\nFor more examples including viewing the output on a map, see the [example notebook](https://colab.research.google.com/github/connor-makowski/scgraph/blob/main/examples/getting_started.ipynb).\n\n\n### Examples with Google Colab\n\n- [Getting Started](https://colab.research.google.com/github/connor-makowski/scgraph/blob/main/examples/getting_started.ipynb)\n- [Creating A Multi Path Geojson](https://colab.research.google.com/github/connor-makowski/scgraph/blob/main/examples/multi_path_geojson.ipynb)\n- [Modifying A Geograph](https://colab.research.google.com/github/connor-makowski/scgraph/blob/main/examples/geograph_modifications.ipynb)\n\n## GridGraph usage\n\nExample:\n- Create a grid of 20x20 cells.\n    - This creates a grid based graph with connections to all 8 neighbors for each grid item.\n    - Each grid item has 4 cardinal connections at length 1 and 4 diagonal connections at length sqrt(2)\n- Create a wall from (10,5) to (10,19).\n    - This would foce any path to go to the bottom of the graph to get around the wall.\n- Get the shortest path between (2,10) and (18,10)\n    - Note: The length of this path should be 16 without the wall and 20.9704 with the wall.\n\n```py\nfrom scgraph import GridGraph\n\nx_size = 20\ny_size = 20\nblocks = [(10, i) for i in range(5, y_size)]\n\n# Create the GridGraph object\ngridGraph = GridGraph(\n    x_size=x_size,\n    y_size=y_size,\n    blocks=blocks,\n    add_exterior_walls=True,\n)\n\n# Solve the shortest path between two points\noutput = gridGraph.get_shortest_path(\n    origin_node={\"x\": 2, \"y\": 10},\n    destination_node={\"x\": 18, \"y\": 10},\n    # Optional: Specify the output coodinate format (default is 'list_of_dicts)\n    output_coordinate_path=\"list_of_lists\",\n    # Optional: Cache the origin point spanning_tree for faster calculations on future calls\n    cache=True,\n)\n\nprint(output)\n#=> {'length': 20.9704, 'coordinate_path': [[2, 10], [3, 9], [4, 8], [5, 8], [6, 7], [7, 6], [8, 5], [9, 4], [10, 4], [11, 4], [12, 5], [13, 6], [14, 7], [15, 7], [16, 8], [17, 9], [18, 10]]}\n```\n\n\n# About\n## Key Features\n\n- `Graph`:\n    - A low level graph object that has methods for validating graphs, calculating shortest paths, and more.\n    - See: [Graph Documentation](https://connor-makowski.github.io/scgraph/scgraph/graph.html)\n    - Contains the following methods:\n        - `validate_graph`: Validates symmetry and connectedness of a graph.\n        - `dijkstra`: Calculates the shortest path between two nodes using Dijkstra's algorithm.\n        - `dijkstra_makowski`: Calculates the shortest path between two nodes using a modified version of Dijkstra's algorithm designed for real world performance\n        - `dijkstra_negative`: Calculates the shortest path between two nodes using a modified version of Dijkstra's algorithm that supports negative edge weights and detects negative cycles.\n        - `a_star`: Modified version of `dijkstra_makowski` that incorporates a heuristic function to guide the search.\n        - `bellman_ford`: Calculates the shortest path between two nodes using the Bellman-Ford algorithm.\n        - `bmssp`: Calculates the shortest path between two nodes using a modified version of the [BMSSP Algorithm](https://arxiv.org/pdf/2504.17033). See the [BmsspSolver](https://connor-makowski.github.io/scgraph/scgraph/bmssp.html).\n- `GeoGraph`s:\n    - A geographic graph data structure that allows for the calculation of shortest paths between two points on earth\n    - Uses latitude / longitude pairs to represent points on earth\n    - Supports maritime, rail, road and other geographic networks\n    - Uses a sparse network data structure to represent the graph\n    - How to use it - Calculate the shortest path between two points on earth\n        - Inputs:\n            - A latitude / longitude pair for the origin\n            - A latitude / longitude pair for the destination\n        - Calculation:\n            - See the `Graph` documentation above for available algorithms.\n        - Returns:\n            - `path`:\n                - A list of lists `[latitude, longitude]` that make up the shortest path\n            - `length`:\n                - The distance (in the units requested) between the two points\n    - Precompiled Geographs offer Antimeridian support\n    - Arbitrary start and end points are supported\n        - Start and end points do not need to be in the graph\n    - Cached shortest path calculations can be used for very fast repetative calculations from the same origin node in a GeoGraph.\n        - This is done by caching the origin node's spanning tree\n        - The first call will be slower, but future calls using this origin node will be substantially faster.\n- `GridGraph`s:\n    - A grid based graph data structure that allows for the calculation of shortest paths between two points on a grid\n    - See: [GridGraph Documentation](https://connor-makowski.github.io/scgraph/scgraph/grid.html)\n    - Supports arbitrary grid sizes and blockages\n    - Uses a sparse network data structure to represent the graph\n    - How to use it - Calculate the shortest path between two points on a grid\n        - Inputs:\n            - A (x,y) coordinate on the grid for the origin\n            - A (x,y) coordinate on the grid for the destination\n        - Calculation:\n            - Algorithms:\n                - Dijkstra's algorithm\n                - Modified Dijkstra algorithm\n                - A* algorithm (Extension of the Modified Dijkstra)\n        - Returns:\n            - `length`:\n                - The distance between the two points on the grid\n            - `coordinate_path`:\n                - A list of dicts `{\"x\": x, \"y\": y}` representing the path taken through the grid\n    - Arbitrary start and end points are supported\n        - Start and end points do not need to be in the graph\n    - Arbitrary connection matricies are supported\n        - Cardinal connections (up, down, left, right) and diagonal connections (up-left, up-right, down-left, down-right) are used by default\n        - Custom connection matricies can be used to change the connections between grid items\n    - Cached shortest path calculations can be used for very fast repetative calculations to or from the same point in a GridGraph.\n- Other Useful Features:\n    - `CacheGraph`s:\n        - A graph extension that caches spanning trees for fast shortest path calculations on repeat calls from the same origin node\n        - See: [CacheGraphs Documentation](https://connor-makowski.github.io/scgraph/scgraph/cache.html)\n    - `SpanningTree`s:\n        - See: [Spanning Trees Documentation](https://connor-makowski.github.io/scgraph/scgraph/spanning.html)\n\n## Included GeoGraphs\n\n- marnet_geograph:\n    - What: A maritime network data set from searoute\n    - Use: `from scgraph.geographs.marnet import marnet_geograph`\n    - Attribution: [searoute](https://github.com/genthalili/searoute-py)\n    - Length Measurement: Kilometers\n    - [Marnet Picture](https://raw.githubusercontent.com/connor-makowski/scgraph/main/static/marnet.png)\n- oak_ridge_maritime_geograph:\n    - What: A maritime data set from the Oak Ridge National Laboratory campus\n    - Use: `from scgraph.geographs.oak_ridge_maritime import oak_ridge_maritime_geograph`\n    - Attribution: [Oak Ridge National Laboratory](https://www.ornl.gov/) with data from [Geocommons](http://geocommons.com/datasets?id=25)\n    - Length Measurement: Kilometers\n    - [Oak Ridge Maritime Picture](https://raw.githubusercontent.com/connor-makowski/scgraph/main/static/oak_ridge_maritime.png)\n- north_america_rail_geograph:\n    - What: Class 1 Rail network for North America\n    - Use: `from scgraph.geographs.north_america_rail import north_america_rail_geograph`\n    - Attribution: [U.S. Department of Transportation: ArcGIS Online](https://geodata.bts.gov/datasets/usdot::north-american-rail-network-lines-class-i-freight-railroads-view/about)\n    - Length Measurement: Kilometers\n    - [North America Rail Picture](https://raw.githubusercontent.com/connor-makowski/scgraph/main/static/north_america_rail.png)\n- us_freeway_geograph:\n    - What: Freeway network for the United States\n    - Use: `from scgraph.geographs.us_freeway import us_freeway_geograph`\n    - Attribution: [U.S. Department of Transportation: ArcGIS Online](https://hub.arcgis.com/datasets/esri::usa-freeway-system-over-1500k/about)\n    - Length Measurement: Kilometers\n    - [US Freeway Picture](https://raw.githubusercontent.com/connor-makowski/scgraph/main/static/us_freeway.png)\n- `scgraph_data` geographs:\n    - What: Additional geographs are available in the `scgraph_data` package\n        - Note: These include larger geographs like the world highways geograph and world railways geograph.\n    - Installation: `pip install scgraph_data`\n    - Use: `from scgraph_data.world_highways import world_highways_geograph`\n    - See: [scgraph_data](https://github.com/connor-makowski/scgraph_data) for more information and all available geographs.\n- Custom Geographs:\n    - What: Users can create their own geographs from various data sources\n    - See: [Building your own Geographs from Open Source Data](https://github.com/connor-makowski/scgraph#building-your-own-geographs-from-open-source-data)\n\n# Advanced Usage\n\n## Using scgraph_data geographs\n\nUsing `scgraph_data` geographs:\n- Note: Make sure to install the `scgraph_data` package before using these geographs\n```py\nfrom scgraph_data.world_railways import world_railways_geograph\nfrom scgraph import Graph\n\n# Get the shortest path between Kalamazoo Michigan and Detroit Michigan by Train\noutput = world_railways_geograph.get_shortest_path(\n    origin_node={\"latitude\": 42.29,\"longitude\": -85.58},\n    destination_node={\"latitude\": 42.33,\"longitude\": -83.05},\n    # Optional: Use the A* algorithm\n    algorithm_fn=Graph.a_star,\n    # Optional: Pass the haversine function as the heuristic function to the A* algorithm\n    algorithm_kwargs={\"heuristic_fn\": world_railways_geograph.haversine},\n)\n```\n\n## Building your own Geographs from Open Source Data\nYou can build your own geographs using various tools and data sources. For example, you can use OpenStreetMap data to create a high fidelity geograph for a specific area.\n\nFollow this step by step guide on how to create a geograph from OpenStreetMap data.\nFor this example, we will use some various tools to create a geograph for highways (including seconday highways) in Michigan, USA.\n\nDownload an OSM PBF file using the AWS CLI:\n- Geofabrik is a good source for smaller OSM PBF files. See: https://download.geofabrik.de/\n- To keep things generalizable, you can also download the entire planet OSM PBF file using AWS. But you should consider downloading a smaller region if you are only interested in a specific area.\n    - Note: For this, you will need to install the AWS CLI.\n    - Note: The planet OSM PBF file is very large (About 100GB)\n        ```\n        aws s3 cp s3://osm-pds/planet-latest.osm.pbf .\n        ```\n- Use Osmium to filter and extract the highways from the OSM PBF file.\n    - Install osmium on macOS:\n        ```\n        brew install osmium-tool\n        ```\n    - Install osmium on Ubuntu:\n        ```\n        sudo apt-get install osmium-tool\n        ```\n- Download a Poly file for the area you are interested in. This is a polygon file that defines the area you want to extract from the OSM PBF file.\n    - For Michigan, you can download the poly file from Geofabrik:\n        ```\n        curl https://download.geofabrik.de/north-america/us/michigan.poly > michigan.poly\n        ```\n    - Google around to find an appropriate poly file for your area of interest.\n- Filter and extract as GeoJSON (EG: Michigan) substituting the poly and pbf file names as needed:\n    ```\n    osmium extract -p michigan.poly --overwrite -o michigan.osm.pbf planet-latest.osm.pbf\n    ```\n- Filter the OSM PBF file to only areas of interest and export to GeoJSON:\n    - See: https://wiki.openstreetmap.org/wiki/\n    - EG For Highways, see: https://wiki.openstreetmap.org/wiki/Key:highway\n    ```\n    osmium tags-filter michigan.osm.pbf w/highway=motorway,trunk,primary,motorway_link,trunk_link,primary_link,secondary,secondary_link,tertiary,tertiary_link -t --overwrite -o michigan_roads.osm.pbf\n    osmium export michigan_roads.osm.pbf -f geojson --overwrite -o michigan_roads.geojson\n    ```\n\n- Simplify the geojson\n    - This uses some tools in the SCGraph library as well as Mapshaper to simplify the geojson files.\n    - Mapshaper is a CLI and web tool for simplifying and editing geojson files.\n    - To install Mapshaper for CLI use, use NPM:\n        ```\n        npm install -g mapshaper\n        ```\n    - Mapshaper is particularly helpful since it repairs intersections in the lines which is crutial for geographs to work properly.\n    - Mapshaper, however, does not handle larger files very well, so it is recommended to simplify the geojson file first using the `scgraph.helpers.geojson.simplify_geojson` function first to reduce the size of the file.\n    - Make sure to tailor the parameters to your needs.\n    ```\n    python -c \"from scgraph.helpers.geojson import simplify_geojson; simplify_geojson('michigan_roads.geojson', 'michigan_roads_simple.geojson', precision=4, pct_to_keep=100, min_points=3, silent=False)\"\n    mapshaper michigan_roads_simple.geojson -simplify 10% -filter-fields -o force michigan_roads_simple.geojson\n    mapshaper michigan_roads_simple.geojson -snap -clean -o force michigan_roads_simple.geojson\n    ```\n- Load the newly created geojson file as a geograph:\n    - Note: The `GeoGraph.load_from_geojson` function is used to load the geojson file as a geograph.\n    - This will create a geograph that can be used to calculate shortest paths between points on the graph.\n    ```\n    from scgraph import GeoGraph\n    michigan_roads_geograph = GeoGraph.load_from_geojson('michigan_roads_simple.geojson')\n    ```\n\n## Custom Graphs and Geographs\nModify an existing geograph: See the notebook [here](https://colab.research.google.com/github/connor-makowski/scgraph/blob/main/examples/geograph_modifications.ipynb)\n\n\nYou can specify your own custom graphs for direct access to the solving algorithms. This requires the use of the low level `Graph` class\n\n```py\nfrom scgraph import Graph\n\n# Define an arbitrary graph\n# See the graph definitions here:\n# https://connor-makowski.github.io/scgraph/scgraph/graph.html#Graph.validate_graph\ngraph = [\n    {1: 5, 2: 1},\n    {0: 5, 2: 2, 3: 1},\n    {0: 1, 1: 2, 3: 4, 4: 8},\n    {1: 1, 2: 4, 4: 3, 5: 6},\n    {2: 8, 3: 3},\n    {3: 6}\n]\n\n# Optional: Validate your graph\nGraph.validate_graph(graph=graph)\n\n# Get the shortest path between idx 0 and idx 5\noutput = Graph.dijkstra_makowski(graph=graph, origin_id=0, destination_id=5)\n#=> {'path': [0, 2, 1, 3, 5], 'length': 10}\n```\n\nYou can also use a slightly higher level `GeoGraph` class to work with latitude / longitude pairs\n\n```py\nfrom scgraph import GeoGraph\n\n# Define nodes\n# See the nodes definitions here:\n# https://connor-makowski.github.io/scgraph/scgraph/geograph.html#GeoGraph.__init__\nnodes = [\n    # London\n    [51.5074, -0.1278],\n    # Paris\n    [48.8566, 2.3522],\n    # Berlin\n    [52.5200, 13.4050],\n    # Rome\n    [41.9028, 12.4964],\n    # Madrid\n    [40.4168, -3.7038],\n    # Lisbon\n    [38.7223, -9.1393]\n]\n# Define a graph\n# See the graph definitions here:\n# https://connor-makowski.github.io/scgraph/scgraph/graph.html#Graph.validate_graph\ngraph = [\n    # From London\n    {\n        # To Paris\n        1: 311,\n    },\n    # From Paris\n    {\n        # To London\n        0: 311,\n        # To Berlin\n        2: 878,\n        # To Rome\n        3: 1439,\n        # To Madrid\n        4: 1053\n    },\n    # From Berlin\n    {\n        # To Paris\n        1: 878,\n        # To Rome\n        3: 1181,\n    },\n    # From Rome\n    {\n        # To Paris\n        1: 1439,\n        # To Berlin\n        2: 1181,\n    },\n    # From Madrid\n    {\n        # To Paris\n        1: 1053,\n        # To Lisbon\n        5: 623\n    },\n    # From Lisbon\n    {\n        # To Madrid\n        4: 623\n    }\n]\n\n# Create a GeoGraph object\nmy_geograph = GeoGraph(nodes=nodes, graph=graph)\n\n# Optional: Validate your graph\nmy_geograph.validate_graph()\n\n# Optional: Validate your nodes\nmy_geograph.validate_nodes()\n\n# Get the shortest path between two points\n# In this case, Birmingham England and Zaragoza Spain\n# Since Birmingham and Zaragoza are not in the graph,\n# the algorithm will add them into the graph.\n# See: https://connor-makowski.github.io/scgraph/scgraph/geograph.html#GeoGraph.get_shortest_path\n# Expected output would be to go from\n# Birmingham -> London -> Paris -> Madrid -> Zaragoza\n\noutput = my_geograph.get_shortest_path(\n    # Birmingham England\n    origin_node = {'latitude': 52.4862, 'longitude': -1.8904},\n    # Zaragoza Spain\n    destination_node = {'latitude': 41.6488, 'longitude': -0.8891}\n)\nprint(output)\n# {\n#     'length': 1799.4323,\n#     'coordinate_path': [\n#         [52.4862, -1.8904],\n#         [51.5074, -0.1278],\n#         [48.8566, 2.3522],\n#         [40.4168, -3.7038],\n#         [41.6488, -0.8891]\n#     ]\n# }\n\n```\n\n# Development\n## Running Tests, Prettifying Code, and Updating Docs\n\nMake sure Docker is installed and running on a Unix system (Linux, MacOS, WSL2).\n\n- Create a docker container and drop into a shell\n    - `./run.sh`\n- Run all tests (see ./utils/test.sh)\n    - `./run.sh test`\n- Prettify the code (see ./utils/prettify.sh)\n    - `./run.sh prettify`\n- Update the docs (see ./utils/docs.sh)\n    - `./run.sh docs`\n\n- Note: You can and should modify the `Dockerfile` to test different python versions.\n\n\n## Attributions and Thanks\nOriginally inspired by [searoute](https://github.com/genthalili/searoute-py) including the use of one of their [datasets](https://github.com/genthalili/searoute-py/blob/main/searoute/data/marnet_densified_v2_old.geojson) that has been modified to work properly with this package.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Determine an approximate route between two points on earth.",
    "version": "2.13.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/connor-makowski/scgraph/issues",
        "Documentation": "https://connor-makowski.github.io/scgraph/scgraph.html",
        "Homepage": "https://github.com/connor-makowski/scgraph"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "09cd0b6c317e3528a36e1b1bc9179065ccc0b2ac54c95fa64f5fcfbcfaa37e24",
                "md5": "b7b27a475702920b18fcbdf761a4fa94",
                "sha256": "aad2cda779b46f6bb2183d67e6d927b6b726e9b2e9c0281c634603a4bb38b509"
            },
            "downloads": -1,
            "filename": "scgraph-2.13.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b7b27a475702920b18fcbdf761a4fa94",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 992226,
            "upload_time": "2025-08-29T13:54:51",
            "upload_time_iso_8601": "2025-08-29T13:54:51.247049Z",
            "url": "https://files.pythonhosted.org/packages/09/cd/0b6c317e3528a36e1b1bc9179065ccc0b2ac54c95fa64f5fcfbcfaa37e24/scgraph-2.13.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7b398abf20f2c7453ebfad8306cb4b8f1fc25b6220a1bb484c8b52408e4dfc67",
                "md5": "4faabf2c68079728932f08c825e79688",
                "sha256": "d659af767a1b834a308974bb9a72c4af251dfba5dde7655646087b61b74b19e4"
            },
            "downloads": -1,
            "filename": "scgraph-2.13.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4faabf2c68079728932f08c825e79688",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 979085,
            "upload_time": "2025-08-29T13:54:56",
            "upload_time_iso_8601": "2025-08-29T13:54:56.486659Z",
            "url": "https://files.pythonhosted.org/packages/7b/39/8abf20f2c7453ebfad8306cb4b8f1fc25b6220a1bb484c8b52408e4dfc67/scgraph-2.13.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-29 13:54:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "connor-makowski",
    "github_project": "scgraph",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "scgraph"
}
        
Elapsed time: 0.94531s