I need to generate room codes for a Flask project, in a similar style to how https://jackbox.tv/ does it.
These room codes will serve as the primary key in a DynamoDB table, and as such will need to be unique.
One option is to use UUIDs, however these are very large and are not user-friendly to type in. Is there a way to generate short (~4-8 character), unique-ish codes without repeatedly querying the DB?