I did some research too and found a much simpler way to do this. You donβt need to get as complicated as you are! A table can be a simple array array without any special rules.
You want to use the hexagonal root coordination system. See Theory here: https://en.wikipedia.org/wiki/Root_system . Also https://www.redblobgames.com/grids/hexagons/
The cell (0,0) is located in the center of the structure, then it has six neighbors: as in the well-known orthogonal table (1,0), (0,1), (-1,0), (0, -1), but also (1,1), (-1-1). Other cameras also have six neighbors, there is no need for a module!
Here are some askii art for understanding:
_____ _____ ____ __ / -2,2\_____/ 0,1 \____/2,0 \____/ \__ \_____/-1,1 \_____/ 1,0\____/3,-1\__/ /-2,1 \_____/0,0 \____/2,-1\____/ \__ \_____/-1,0 \_____/1,-1\____/3,-2\__/ /-2,0 \_____/ 0,-1\____/2,-2\____/ \__ \_____/ \_____/ \____/ \__/
You can calculate the position of the center of each cell in the plane (and so on the screen), because it follows the rules of vector geometry. The vector has coordinates that are 60 Β° instead of 90 Β°: a = (0,1), but b = (0,87,0,5), just multiply and add these coordinates!
You can use pyhton librairy hexy: https://github.com/RedFT/Hexy