Is there a Python module where I can create objects with a geographical location coordinate (latitude and longitude), and query all the objects for ones which are within a 5
I know this isn't exactly what you meant, but you could use GeoDjango with an in-memory SQLite database. It's a full set of GIS tools exposed as a Web application, which makes it a Swiss Army knife for rapidly developing GIS applications, especially for small ad hoc queries.