Skip to content

Commit 6743d6c

Browse files
author
Ashish Talati
committed
Add func template
1 parent b925bb1 commit 6743d6c

File tree

10 files changed

+758
-0
lines changed

10 files changed

+758
-0
lines changed

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"ms-azuretools.vscode-azurefunctions",
4+
"ms-python.python"
5+
]
6+
}

.vscode/launch.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Attach to Python Functions",
6+
"type": "python",
7+
"request": "attach",
8+
"port": 9091,
9+
"preLaunchTask": "func: host start"
10+
}
11+
]
12+
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"azureFunctions.deploySubpath": "Python",
3+
"azureFunctions.scmDoBuildDuringDeployment": true,
4+
"azureFunctions.projectLanguage": "Python",
5+
"azureFunctions.projectRuntime": "~4",
6+
"debug.internalConsoleOptions": "neverOpen"
7+
}

.vscode/tasks.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "func",
6+
"label": "func: host start",
7+
"command": "host start",
8+
"problemMatcher": "$func-python-watch",
9+
"isBackground": true,
10+
"options": {
11+
"cwd": "${workspaceFolder}/Python"
12+
}
13+
}
14+
]
15+
}

Python/Search/function.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"scriptFile": "../shared_code/SearchInit.py",
3+
"bindings": [
4+
{
5+
"authLevel": "function",
6+
"type": "httpTrigger",
7+
"direction": "in",
8+
"name": "req",
9+
"methods": [
10+
"post"
11+
]
12+
},
13+
{
14+
"type": "http",
15+
"direction": "out",
16+
"name": "$return"
17+
}
18+
],
19+
"retry": {
20+
"strategy": "exponentialBackoff",
21+
"maxRetryCount": 2,
22+
"minimumInterval": "00:00:10",
23+
"maximumInterval": "00:01:30"
24+
}
25+
}

Python/Summarize/function.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"scriptFile": "../shared_code/SummarizeInit.py",
3+
"bindings": [
4+
{
5+
"authLevel": "function",
6+
"type": "httpTrigger",
7+
"direction": "in",
8+
"name": "req",
9+
"methods": [
10+
"post"
11+
]
12+
},
13+
{
14+
"type": "http",
15+
"direction": "out",
16+
"name": "$return"
17+
}
18+
],
19+
"retry": {
20+
"strategy": "exponentialBackoff",
21+
"maxRetryCount": 2,
22+
"minimumInterval": "00:00:10",
23+
"maximumInterval": "00:01:30"
24+
}
25+
}

Python/host.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"version": "2.0",
3+
"logging": {
4+
"console": {
5+
"isEnabled": true,
6+
"DisableColors": false
7+
},
8+
"applicationInsights": {
9+
"samplingSettings": {
10+
"isEnabled": true,
11+
"excludedTypes": "Request"
12+
}
13+
}
14+
},
15+
"extensionBundle": {
16+
"id": "Microsoft.Azure.Functions.ExtensionBundle",
17+
"version": "[2.*, 3.0.0)"
18+
},
19+
"extensions": {
20+
"http": {
21+
"routePrefix": "language"
22+
}
23+
}
24+
}

Python/requirements.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Do not include azure-functions-worker as it may conflict with the Azure Functions platform
2+
3+
azure-functions
4+
azure-ai-textanalytics
5+
azure-core
6+
numpy
7+
datetime
8+
click==8.0.4
9+
#spacy>=3.1.0,<3.2.0
10+
azure-storage-blob>=12.0.0
11+
azure-cosmosdb-table
12+
pandas
13+
14+
# English
15+
#https://github.com/explosion/spacy-models/releases/download/en_core_web_lg-3.1.0/en_core_web_lg-3.1.0.tar.gz#egg=en_core_web_lg
16+
17+
# German
18+
#https://github.com/explosion/spacy-models/releases/download/de_core_news_lg-3.1.0/de_core_news_lg-3.1.0.tar.gz#egg=de_core_news_lg

0 commit comments

Comments
 (0)