Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 1.4 KB

File metadata and controls

22 lines (13 loc) · 1.4 KB

Azure Cosmos DB API For MongoDB Python Quickstart and Getting Started Guides

This repo shows how to get started with the Azure Cosmos DB API for MongoDB API in a Python application.

  • The sample in the root directory, run.py, prompts you for connection information. This sample is written with separate functions for each operation as you might do in a production application. Try this sample to get started quickly.

  • The sample folders (e.g., 001-quickstart directory) contain runnable samples used in documentation quickstart and getting started guides. If you make changes here keep the documentation in sync.

The validate workflow is set up for pull requests. See the workflow for tests that are run and run those locally first.

Sample prerequisites

Prerequisites:

  • An Azure Cosmos DB API for MongoDB Account
  • Python 3.8+ installed
  • PyMongo installed
  • python-dotenv installed to read the connection string from an .env file for all samples except the root directory sample.

Use python run.py to run the code samples.

Make sure you define an .env variable with the connection string if needed for a sample.