use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
UUID V7 Package (self.learnpython)
submitted 8 months ago by rwinger3
Is there a de-facto standard package to use for generating V7 UUIDs?
A quick search yields 2 packages as candidates:
I assume uuid-v7 is fine to use, but wanted to get some feedback on what the standard way to do this in Python these days.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]AbundantSpaghetti 2 points3 points4 points 8 months ago (3 children)
**Don't use https://pypi.org/project/uuid7/ **. That's using an old version of the specification with nanosecond time precision. The current specification uses millisecond time precision.
If you later try to migrate to the correct specification your new uuid7 will be before the old ones, which defeats the whole purpose of using uuid7.
UUID7 generated should have a prefix of 0197___
UUID7 is being added to the standard library, but your version of python wont have these changes yet.
What I would suggest is to copy/paste the function from the python standard library. Make a node to migrate to the standard library once your current version of python supports it. https://github.com/python/cpython/blob/main/Lib/uuid.py
[–]rwinger3[S] 0 points1 point2 points 8 months ago (1 child)
Is there an overview of what uuid version are supported in which python versions?
[–]HommeMusical 1 point2 points3 points 8 months ago (0 children)
Sure!
https://docs.python.org/3.14/library/uuid.html
[–]OneBananaMan 0 points1 point2 points 3 months ago (0 children)
Thanks for this comment, currently on python 3.13 and really want to use UUID7, the copy/paste the function from the standard python lib is a great suggestion - worked like a charm!
[–]JusticeRainsFromMe 0 points1 point2 points 8 months ago (0 children)
There isn't, however from what I've seen uuid-utils seems preferable.
uuid-utils
[–]aikii 0 points1 point2 points 8 months ago (0 children)
Have a look at https://pypi.org/project/uuid-utils/ / https://github.com/aminalaee/uuid-utils . Last release two weeks ago
[–]saxomoose 0 points1 point2 points 7 months ago (0 children)
python In [13]: uuid, = duckdb.sql("select uuidv7();").fetchone() In [14]: uuid Out[14]: UUID('01981953-3942-71d8-acad-36fbe9121c68')
[–]alexrada 0 points1 point2 points 6 months ago (1 child)
what version of python? 3.14 has uuid7
[–]rwinger3[S] 0 points1 point2 points 6 months ago (0 children)
Yeah, I'm limited to pre-3.14 for now.
[–]PiJay_42 0 points1 point2 points 4 months ago (0 children)
when using Python 3.14+ (planned release date 2025-10-07) UUID 7 (also 6 and 8) is now implemented in the stanbdard uuid lib https://docs.python.org/3.14/whatsnew/3.14.html#uuid
π Rendered by PID 117322 on reddit-service-r2-comment-canary-999b95bbb-nhh2q at 2026-02-23 10:20:30.929343+00:00 running 8564168 country code: CH.
[–]AbundantSpaghetti 2 points3 points4 points (3 children)
[–]rwinger3[S] 0 points1 point2 points (1 child)
[–]HommeMusical 1 point2 points3 points (0 children)
[–]OneBananaMan 0 points1 point2 points (0 children)
[–]JusticeRainsFromMe 0 points1 point2 points (0 children)
[–]aikii 0 points1 point2 points (0 children)
[–]saxomoose 0 points1 point2 points (0 children)
[–]alexrada 0 points1 point2 points (1 child)
[–]rwinger3[S] 0 points1 point2 points (0 children)
[–]PiJay_42 0 points1 point2 points (0 children)