This is the legacy Python SDK for Azure DocumentDB, which was rebranded to Azure Cosmos DB. This `pydocumentdb` package is no longer maintained and has been superseded by the `azure-cosmos` package. Users should migrate to `azure-cosmos` for current development. The last stable version released under this name was 2.3.5.
pip install pydocumentdbVerified import paths — ran on the pinned version, not inferred.
Shows how to initialize the legacy DocumentDB client. This code is for the `pydocumentdb` package, which is no longer maintained. Users are strongly advised to migrate to `azure-cosmos` for any new development or existing applications connecting to Azure Cosmos DB.
Migrate your code to use the `azure-cosmos` package. Refer to Azure Cosmos DB documentation for migration guides and updated APIs (e.g., `CosmosClient` instead of `DocumentClient`).
Use the `azure-cosmos` package to connect to Azure Cosmos DB accounts. Ensure your connection strings and authentication methods align with the current Azure SDK for Python.
Upgrade your Python environment to 3.7+ and use the `azure-cosmos` SDK for current Azure Cosmos DB interactions.
If you intend to use the legacy SDK, run `pip install pydocumentdb`. If you intend to use the modern SDK (recommended), install `azure-cosmos` (`pip install azure-cosmos`) and update your imports and code accordingly.
Ensure your import statement is `from pydocumentdb.document_client import DocumentClient`. For modern Cosmos DB, use `from azure.cosmos import CosmosClient` from the `azure-cosmos` package.
First, verify your master key and host URL are correct for the legacy DocumentDB account. More importantly, consider migrating to the `azure-cosmos` package, as `pydocumentdb` is not compatible with all modern Cosmos DB features and authentication, and its connection details may differ.
No dependency data recorded yet.
No resource links recorded.