Python k-means algorithm
You can also use GDAL, which has many many functions to work with spatial data.
I am looking for Python implementation of k-means algorithm with examples to cluster and cache my database of coordinates.