Skip to content

Latest commit

 

History

History
43 lines (25 loc) · 1.35 KB

README.md

File metadata and controls

43 lines (25 loc) · 1.35 KB

Python API with Azure Cosmos DB

Requirements

Allocate resources

The script up provisions Azure resources by applying our Terraform script.

Configure Cosmos DB

Env file

After resources have been provisioned, one has to create a file named .env_cosmosdb in the root of this project which contains necessary information in order to access our newly provisioned Cosmos DB account such as connection string, database and container name. These fields will be mapped to our cosmos config.

screenshot

Connection string

The connection string may be retrieved from Azure at Settings->Keys for your Cosmos DB account.

screenshot

Running API

python -m uvicorn app.main:app --reload

Deallocate resources

The script down removes provisioned Azure resources running terraform destroy.

Postman collection

A collection of sample request has been included under the postman directory.