Download and config the sample

Download the sample app from GitHub:

git clone https://github.com/scott-zhou/batch-python-experiment.git

In your Python development environment, install the required packages using pip.

cd batch-python-experiment
python3 -m venv venv  # On Windows: py -3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install --upgrade pip
pip install wheel
pip install -r src/requirements.txt

Open the file src/config.py. Update the Batch and storage account credential strings with the values from your accounts. You can find your account credential from Azure Portal. For example:

_BATCH_ACCOUNT_NAME = 'mybatchaccount'
_BATCH_ACCOUNT_KEY = 'xxxxxxxxxxxxxxxxE+yXrRvJAqT9BlXwwo1CwF+SwAYOxxxxxxxxxxxxxxxx43pXi/gdiATkvbpLRl3x14pcEQ=='
_BATCH_ACCOUNT_URL = 'https://mybatchaccount.mybatchregion.batch.azure.com'
_STORAGE_ACCOUNT_NAME = 'mystorageaccount'
_STORAGE_ACCOUNT_KEY = 'xxxxxxxxxxxxxxxxy4/xxxxxxxxxxxxxxxxfwpbIC5aAWA8wDu+AFXZB827Mt9lybZB1nUcQbQiUrkPtilK5BQ=='

Last updated

Was this helpful?