Clone the Boilerplate Project
We will guide you through the process of cloning the boilerplate project to your development machine. The boilerplate project has everything you need to get started to include several dummy functions that you can you use.
Step 1: Clone the project
Clone using Git SSH
git clone git@github.com:funcrunner/azure_function_app_python.git your_project_name
Clone using Git HTTPS
git clone https://github.com/funcrunner/azure_function_app_python.git your_project_name
Step 2: Setup Python Virtual Environment
To isolate your project’s dependencies and ensure a clean and reproducible development environment, it’s recommended to use a Python virtual environment. Follow the steps below to set up the virtual environment for the cloned boilerplate project.
2.1 Create the Virtual Environment
Important Note - Python 3.11
At the time of this writing, the supported runtime is for Python 3.11 only. This is the latest version of Python supported by Azure Function Apps.
Create a virtual environment named venv
(or any name you prefer):
python3 -m venv venv
2.2 Activate the Virtual Environment
After creating the virtual environment, you need to activate it. The method of activation varies depending on your operating system:
On macOS/Linux:
source venv/bin/activate
On Windows:
venv\Scripts\activate
Once activated, your command prompt should change to indicate that you’re now working within the virtual environment.
2.3 Install Dependencies
With the virtual environment activated, install the required dependencies for your project by running:
pip install -r requirements.txt
This command reads the requirements.txt
file, which lists all the necessary Python packages, and installs them into your virtual environment.
Now your development environment is set up, and you’re ready to start working on your project.
Next Recommended Reading
Create the Azure Function App environment that will host your code. Read the Create Azure Function App guide.