Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 854 Bytes

README.md

File metadata and controls

58 lines (42 loc) · 854 Bytes

Prerequisite

  1. Python v10 or higher
  2. Azure CosmosDB for Table database connection string
  3. Azure CLI
  4. Install azure-functions-core-tools
npm install -g azure-functions-core-tools

Setup

  1. Clone repository
git clone https://github.com/gabbyTI/python-counter-api.git
  1. Initialize the azure function to create the
cd python-counter-api
func init
  1. Install dependencies
pip install -r requirements.txt
  1. Add connection string and table name to the local.settings.json file(this is created after the 2nd steps)
{
  ...
  "Values": {
    ...
    "conn_str": "your connection string",
    "table_name": "your table name"
  }
}

Running Azure Function Locally

  1. Login to Azure
az login
  1. Start the azure function locally
func start -p 7071