Skip to content

support for mongodb+srv:// URIs #114

Description

@stenczelt

Logging in to a MongoDB cluster with mongodb+srv:// is not possible, the URI is not recognised.

Traceback (most recent call last):
  File "/root/venv/bin/abcd", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/root/venv/lib/python3.11/site-packages/abcd/frontends/commandline/parser.py", line 121, in main
    callback_func(**kwargs)
  File "/root/venv/lib/python3.11/site-packages/abcd/frontends/commandline/decorators.py", line 15, in wrapper
    func(*args, config=config, **kwargs)
  File "/root/venv/lib/python3.11/site-packages/abcd/frontends/commandline/commands.py", line 17, in login
    db = ABCD.from_url(url=url)
         ^^^^^^^^^^^^^^^^^^^^^^
  File "/root/venv/lib/python3.11/site-packages/abcd/__init__.py", line 47, in from_url
    raise NotImplementedError('Unable to recognise the type of connection. (url: {})'.format(url))
NotImplementedError: Unable to recognise the type of connection. (url: mongodb+srv://***)

Expected behaviour

Operate the same way as with mongodb:// and use uri-mode for the connection, i.e. not saving the credentials individually but simply use the URI.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions