from graphs import AdjGraph
g = AdjGraph().cycle(1,2,3,4,5).link(2,4).link(3,5)Appendix C — The hitchhiker-graphs Python Package
This appendix is dedicated to the hitchhiker-graphs Python package. You are free to skip it if you don’t care about the coding part of the book.
The hitchhikers-graph package contains the main code used in this book, including class definitions for all the graph types and functions for all search algorithms. It does not contain scripting code that we used to illustrate how the algorithms run.
To install the package, just type:
$ pip install hitchhiker-graphsOnce installation is ready, you can import the AdjGraph class and start doing fun stuff.
Which generates the following graph: