https://github.com/lpasselin/smallestenclosingcircle
pip install smallestenclosingcircle
import smallestenclosingcircle
center_x, center_y, radius = smallestenclosingcircle.make_circle(points)
# points must be iterable of points e.g.:
# numpy array of shape (N, 2)
# list of tuples
# [(1, 2), (8, 9), (4, 5), (-6, -7), ... ]
#
# Note: if no points are input, returns None
Original source from: https://www.nayuki.io/page/smallest-enclosing-circle