You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#Customer intent: As a developer, I need to know how to add a binding to an existing function so that I can integrate external services to my function.
Copy file name to clipboardExpand all lines: articles/azure-functions/create-first-function-cli-python.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ py -m venv .venv
87
87
88
88
You run all subsequent commands in this activated virtual environment.
89
89
90
-
## Create a local function project
90
+
## Create a local function
91
91
92
92
In Azure Functions, a function project is a container for one or more individual functions that each responds to a specific trigger. All functions in a project share the same local and hosting configurations.
93
93
::: zone pivot="python-mode-configuration"
@@ -116,7 +116,7 @@ In this section, you create a function project that contains a single function.
116
116
`func new` creates a subfolder matching the function name that contains a code file appropriate to the project's chosen language and a configuration file named *function.json*.
117
117
::: zone-end
118
118
::: zone pivot="python-mode-decorators"
119
-
In this section, you create a function project.
119
+
In this section, you create a function project and add an HTTP triggered function.
120
120
121
121
1. Run the `func init` command as follows to create a functions project in a folder named *LocalFunctionProj* with the specified runtime and the specified programming model version.
122
122
@@ -132,7 +132,7 @@ In this section, you create a function project.
132
132
133
133
This folder contains various files for the project, including configuration files named [*local.settings.json*](functions-develop-local.md#local-settings-file) and [*host.json*](functions-host-json.md). Because *local.settings.json* can contain secrets downloaded from Azure, the file is excluded from source control by default in the *.gitignore* file.
134
134
135
-
1. The file `function_app.py` can include all functions within your project. Open this file and replace the existing contents with the following code that also defines an HTTP triggered function named HttpExample:
135
+
1. The file `function_app.py` can include all functions within your project. Open this file and replace the existing contents with the following code that adds an HTTP triggered function named `HttpExample`:
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-core-tools-reference.md
+18-4
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ When you supply `<PROJECT_FOLDER>`, the project is created in a new folder with
44
44
|**`--force`**| Initialize the project even when there are existing files in the project. This setting overwrites existing files with the same name. Other files in the project folder aren't affected. |
45
45
|**`--language`**| Initializes a language-specific project. Currently supported when `--worker-runtime` set to `node`. Options are `typescript` and `javascript`. You can also use `--worker-runtime javascript` or `--worker-runtime typescript`. |
46
46
|**`--managed-dependencies`**| Installs managed dependencies. Currently, only the PowerShell worker runtime supports this functionality. |
47
+
|**`--model`**| Sets the desired programming model for a target language when more than one model is available. Supported options are `V1` and `V2` for Python and `V3` and `V4` for Node.js. For more information, see the [Python developer guide](functions-reference-python.md#programming-model) and the [Node.js developer guide](functions-reference-node.md), respectively. |
47
48
|**`--source-control`**| Controls whether a git repository is created. By default, a repository isn't created. When `true`, a repository is created. |
48
49
|**`--worker-runtime`**| Sets the language runtime for the project. Supported values are: `csharp`, `dotnet`, `dotnet-isolated`, `javascript`,`node` (JavaScript), `powershell`, `python`, and `typescript`. For Java, use [Maven](functions-reference-java.md#create-java-functions). To generate a language-agnostic project with just the project files, use `custom`. When not set, you're prompted to choose your runtime during initialization. |
49
50
|**`--target-framework`**| Sets the target framework for the function app project. Valid only with `--worker-runtime dotnet-isolated`. Supported values are: `net6.0` (default), `net7.0`, and `net48`. |
@@ -472,11 +473,16 @@ To learn more, see the [Durable Functions documentation](./durable/durable-funct
472
473
473
474
## func extensions install
474
475
475
-
Installs Functions extensions in a non-C# class library project.
476
+
Manually installs Functions extensions in a non-.NET project or in a C# script project.
476
477
477
-
When possible, you should instead use extension bundles. To learn more, see [Extension bundles](functions-bindings-register.md#extension-bundles).
478
+
> [!TIP]
479
+
> When possible, you should instead use extension bundles. To learn more, see [Extension bundles](functions-bindings-register.md#extension-bundles).
478
480
479
-
For compiled C# projects (both in-process and isolated worker process), instead use standard NuGet package installation methods, such as `dotnet add package`.
481
+
The following are some reasons why you might need to install extensions manually:
482
+
483
+
* You need to access a specific version of an extension not available in a bundle.
484
+
* You need to access a custom extension not available in a bundle.
485
+
* You need to access a specific combination of extensions not available in a single bundle.
480
486
481
487
The `install` action supports the following options:
482
488
@@ -490,7 +496,15 @@ The `install` action supports the following options:
490
496
|**`--source`**| NuGet feed source when not using NuGet.org.|
491
497
|**`--version`**| Extension package version. |
492
498
493
-
No action is taken when an extension bundle is defined in your host.json file. When you need to manually install extensions, you must first remove the bundle definition. For more information, see [Install extensions](functions-run-local.md#install-extensions).
499
+
The following considerations apply when using `func extensions install`:
500
+
501
+
+ For compiled C# projects (both in-process and isolated worker process), instead use standard NuGet package installation methods, such as `dotnet add package`.
502
+
503
+
+ To manually install extensions using Core Tools, you must have the [.NET 6.0 SDK](https://dotnet.microsoft.com/download) installed.
504
+
505
+
+ Before you can manually install extensions, you must first remove the [`extensionBundle`](functions-host-json.md#extensionbundle) object from the host.json file that defines the bundle. No action is taken when an extension bundle is already set in your [host.json file](functions-host-json.md#extensionbundle).
506
+
507
+
+ The first time you explicitly install an extension, a .NET project file named extensions.csproj is added to the root of your app project. This file defines the set of NuGet packages required by your functions. While you can work with the [NuGet package references](/nuget/consume-packages/package-references-in-project-files) in this file, Core Tools lets you install extensions without having to manually edit this C# project file.
0 commit comments