Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

No method get_database_client in CosmosClient #181

Open
bukarev opened this issue Sep 10, 2019 · 2 comments
Open

No method get_database_client in CosmosClient #181

bukarev opened this issue Sep 10, 2019 · 2 comments

Comments

@bukarev
Copy link

bukarev commented Sep 10, 2019

The documentation and examples point to the method get_database_client(database) to get a database by ID. Python3 runtime throws an error that such method doesn't exist.

In fact, calling of dir() on a CosmosClient instance gives the list of methods not at all listed in the documentation, and it's consistent with the source code right here.

Documentation seems to be completely out of sync.

@RobertoPrevato
Copy link

Yep. I came here because I wanted to log the same issue.
The solution is to remove these lines:

database = client.get_database_client(database_name)
container = database.get_container_client(container_name)

The QueryItems method is directly on the CosmosClient class, which makes sense IMHO. The documentation about the "query" example is out of sync. By the way, an example on how to use continuation tokens would be nice.

@aarsan
Copy link

aarsan commented Jun 21, 2020

Looks like the latest version of the package fixes this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants