If you are building a new Python service today, the most important comparison is often not UUID versus integer. It is UUID v4 versus UUID v7. Both solve the distributed uniqueness problem, but they do it with different operational trade-offs. UUID v4 is random. UUID v7 is time-ordered. That difference sounds small on paper, but it matters a lot for databases, logs, and systems that care about insertion locality.
UUID v4 remains attractive when unpredictability and simplicity are the main goals. It is familiar, well-known, and supported almost everywhere. For externally visible identifiers, queue messages, correlation IDs, and systems where ordering is irrelevant, it is still a defensible choice. But for write-heavy tables, UUID v7 is often more storage-friendly because it behaves in a way that is closer to append-oriented growth. You do not get a strict auto-increment sequence, but you usually get a better fit for index locality than with a fully random UUID.
That is why the UUID v4 vs v7 comparison matters so much for performance-minded Python teams. If you are choosing identifiers for PostgreSQL-backed APIs, event stores, analytics ingestion systems, or high-write operational databases, UUID v7 deserves serious consideration. The advantage is not theoretical elegance. The advantage is more predictable growth behavior in the data layer.
None of that makes UUID v4 obsolete. It just means the decision space has changed. In older discussions, the default question was often “Should we use UUIDs at all?” In newer systems, the better question is often “If we want UUIDs, which version best fits our storage behavior?” Python developers who ignore that distinction risk defaulting to UUID v4 out of habit when UUID v7 may be the stronger fit.