Hi, I’m afraid you are correct that there isn’t a direct way to retrieve a list of buckets in a cluster in Python. We do store the list in the _buckets member variable as an implementation detail but this isn’t supposed to be used externally. The supported way would be to use the REST API: https://developer.couchbase.com/documentation/server/5.1/rest-api/rest-endpoints-all.html
However, I will add this feature for the next release, which should be in the next week or two. Here is the JIRA:
Hi, yes, it should be available in the latest Couchbase Python Client, version 2.5.5. Unfortunately. it looks like I forgot to update the docs index so it’s missing from those, but the method is documented:
Will raise a ticket to add it to the docs index. Hope that helps!
thank you @ellis.breen…I do have the Couchbase Python Client 2.5.5 installed but do not see the method ‘bucket_list’. please share the info once the index is updated.
Hi, it turns out the RST docs should autoindex the Admin class anyway - for some reason it was omitted from the uploaded docs (probably generated prior to the addition of the buckets_list method). I’ve just generated the docs with the buckets_list method documented, which should be here soon: