The easiest would be with Open Babel in Python (e.g. Pybel).
from openbabel import pybel
mol = next(pybel.readfile('xyz', filename)) # readfile returns an iterator
mol.OBMol.ConnectTheDots() # perceives bonding between atoms
mol.OBMol.PerceiveBondOrders() # guesstimates bond orders
My group is working on an improved ML-based bond perception code - hopefully we can release that soon… it won’t depend (much) on the underlying toolkit.