Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UUID v7 Support #204

Open
3 of 13 tasks
chrisgoddard opened this issue Aug 21, 2024 · 3 comments
Open
3 of 13 tasks

UUID v7 Support #204

chrisgoddard opened this issue Aug 21, 2024 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@chrisgoddard
Copy link

Initial Checks

  • I have searched Google & GitHub for similar requests and couldn't find anything
  • I have read and followed the docs and still think this feature is missing

Description

UUIDv7 is becoming much more widely utilized in a variety of applications due to it's embedded timestamp and lexicographical sorting. It would be great to have that version supported by the Pydantic UUID field type.

Affected Components

@sydney-runkle sydney-runkle added the help wanted Extra attention is needed label Aug 21, 2024
@sydney-runkle
Copy link
Member

Sounds great, PRs welcome!

@Vasanth-96
Copy link

Vasanth-96 commented Aug 21, 2024

Sounds great, PRs welcome!

Hi @sydney-runkle Just a heads up—the default uuid package currently doesn't support UUIDv7. We'll need to use a uuid_utils package and add it separately.

ref1: https://docs.python.org/3/library/uuid.html
ref2: https://pypi.org/project/uuid-utils/0.2.0/
ref3: https://discuss.python.org/t/add-uuid7-in-uuid-module-in-standard-library/44390

Looking forward to your feedback!

@sydney-runkle
Copy link
Member

Hmph, in that case, we can add support in pydantic-extra-types, but won't offer first class support here until it's included in the stdlib uuid package.

@sydney-runkle sydney-runkle transferred this issue from pydantic/pydantic Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants