Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.25 KB

File metadata and controls

43 lines (28 loc) · 1.25 KB

CosmosDB

Since testcontainers-python :material-tag: v4.7.0

Introduction

The Testcontainers module for Azure Cosmos DB.

Adding this module to your project dependencies

Please run the following command to add the CosmosDB module to your python dependencies:

pip install testcontainers[cosmosdb] pymongo azure-cosmos

Usage example

Creating a CosmosDB container

Features

  • Multi-model database support (document, key-value, wide-column, graph)
  • SQL-like query language
  • Automatic indexing
  • Partitioning support
  • Global distribution
  • Built-in aggregation functions
  • Container management
  • Document CRUD operations

Configuration

The CosmosDB container can be configured with the following parameters:

  • port: Port to expose (default: 8081)
  • version: CosmosDB Emulator version to use (default: "latest")
  • ssl_verify: Whether to verify SSL certificates (default: False)
  • emulator_key: Emulator key for authentication (default: "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==")