I'm trying to query or list all collections in a RavenDB database, using RavenDB's Python Client.
So far I've come to something like:
URLS = ['http://localhost:8080']
DB_NAME = 'my-db'
store = DocumentStore(URLS, DB_NAME)
store.initialize()
with store.open_session() as session:
collections = session.advanced.document_store.database_commands.get_collections(0, 50)
The last line errors out with:
AttributeError: 'DocumentStore' object has no attribute 'database_commands'
Obviously the database_commands
isn't available. But how can I list all collections in a RavenDB v5.4+ database instead, using py-ravendb?