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

Support for ObjectId while dealing with mongoDB #8853

Closed
5 of 13 tasks
chethanlreddy opened this issue Feb 20, 2024 · 1 comment
Closed
5 of 13 tasks

Support for ObjectId while dealing with mongoDB #8853

chethanlreddy opened this issue Feb 20, 2024 · 1 comment

Comments

@chethanlreddy
Copy link

chethanlreddy commented Feb 20, 2024

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

class User(BaseModel):
email : str
password:str
class UserOut(User):
id: ObjectId

something like this

Affected Components

@chethanlreddy chethanlreddy changed the title Support for ObjectId while dealing with mongoDB etc Support for ObjectId while dealing with mongoDB Feb 20, 2024
@sydney-runkle
Copy link
Member

Hi @chethanlreddy,

Thanks for this feature request. I'm marking this as a duplicate of pydantic/pydantic-extra-types#133. Feel free to refer to that issue re progress for supporting this type. I'd also recommend you take a look at beanie (https://beanie-odm.dev/), which offers awesome support for mongodb + pydantic integration.

@sydney-runkle sydney-runkle closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2024
@sydney-runkle sydney-runkle self-assigned this Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants