ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Packaging
    • None
    • Python Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      Users configuring MongoClient from environment variables or .env files today do it by hand, with no validation or type coercion. Design gist: https://gist.github.com/blink1073/0d8cd1af7934eb6e0902603cb350068f

      Definition of done

      An optional pymongo[pydantic-settings] extra is available that provides a typed, validated settings model (built on pydantic-settings) for configuring MongoClient/AsyncMongoClient from environment variables or .env files. The extra is opt-in and adds no hard dependency to core PyMongo.

      Pitfalls

      Avoid colliding with the existing internal pymongo/synchronous/settings.py and pymongo/asynchronous/settings.py modules, which are unrelated. Keep the field set curated rather than mirroring every MongoClient option, to limit future maintenance burden as options evolve.

            Assignee:
            Unassigned
            Reporter:
            Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: