Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add library worker #1637

Draft
wants to merge 23 commits into
base: dev-313
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 1 addition & 7 deletions .artifactignore
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
_manifest\**
bcde-output\**
Experiment_PipReport_**
GovCompDisc_Log_**
GovCompDisc_Manifest_**
GovCompDisc_Metadata_**
ScanTelemetry_**
_manifest\**
102 changes: 0 additions & 102 deletions .ci/e2e_integration_test/start-e2e.ps1

This file was deleted.

2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ omit =
# Removing the imported libraries that might show up in this.
*/azure/functions/*
*/azure/*
*/azure_functions_worker/_thirdparty/*
*/azure_functions_worker_v2/_thirdparty/*
21 changes: 0 additions & 21 deletions .devcontainer/Dockerfile

This file was deleted.

57 changes: 0 additions & 57 deletions .devcontainer/devcontainer.json

This file was deleted.

5 changes: 3 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
ignore = W503,E402,E731

exclude = .git, __pycache__, build, dist, .eggs, .github, .local, docs/,
Samples, azure_functions_worker/protos/,
azure_functions_worker/_thirdparty/typing_inspect.py,
Samples, azure_functions_worker_v2_v2/protos/,
azure_functions_worker/utils/typing_inspect.py,
tests/unittests/test_typing_inspect.py,
tests/unittests/broken_functions/syntax_error/main.py,
tests/protos/,
.env*, .vscode, venv*, *.venv*

max-line-length = 88
4 changes: 2 additions & 2 deletions .github/linters/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ exclude =
docs,
Samples,
__pycache__,
azure_functions_worker/protos/,
azure_functions_worker/_thirdparty/typing_inspect.py,
azure_functions_worker_v2/protos/,
azure_functions_worker_v2/_thirdparty/typing_inspect.py,
tests/unittests/test_typing_inspect.py,
.venv*,
.env*,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
# VALIDATE_PYTHON_PYLINT: false # disable pylint, as we have not configure it
# VALIDATE_PYTHON_BLACK: false # same as above
PYTHON_FLAKE8_CONFIG_FILE: tox.ini
FILTER_REGEX_INCLUDE: azure_functions_worker/.*
FILTER_REGEX_INCLUDE: azure_functions_worker_v2/.*
FILTER_REGEX_EXCLUDE: tests/.*
DEFAULT_BRANCH: dev
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,6 @@ prof/
tests/**/host.json
tests/**/bin
tests/**/extensions.csproj

# Protos
*pb2*
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
# <img src="https://raw.githubusercontent.com/Azure/azure-functions-python-worker/dev/docs/Azure.Functions.svg" width = "30" alt="Functions Header Image - Lightning Logo"> Azure Functions Python Worker

| Branch | Build Status | CodeCov | Test Status |
|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| dev | [![Build Status](https://img.shields.io/azure-devops/build/azfunc/public/658/dev)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=658&branchName=dev) | [![codecov](https://codecov.io/gh/Azure/azure-functions-python-worker/branch/dev/graph/badge.svg)](https://codecov.io/gh/Azure/azure-functions-python-worker) | [![Test Status](https://img.shields.io/azure-devops/build/azfunc/public/658/dev)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=658&branchName=dev) |
| Branch | Status | CodeCov | Unittests | E2E tests |
|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|
| main | [![Build Status](https://azfunc.visualstudio.com/Azure%20Functions/_apis/build/status/Azure.azure-functions-python-worker?branchName=main)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=57&branchName=main) | [![codecov](https://codecov.io/gh/Azure/azure-functions-python-worker/branch/main/graph/badge.svg)](https://codecov.io/gh/Azure/azure-functions-python-worker) | ![CI Unit tests](https://github.com/Azure/azure-functions-python-worker/workflows/CI%20Unit%20tests/badge.svg?branch=main) | ![CI E2E tests](https://github.com/Azure/azure-functions-python-worker/workflows/CI%20E2E%20tests/badge.svg?branch=main) |
| dev | [![Build Status](https://azfunc.visualstudio.com/Azure%20Functions/_apis/build/status/Azure.azure-functions-python-worker?branchName=dev)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=57&branchName=dev) | [![codecov](https://codecov.io/gh/Azure/azure-functions-python-worker/branch/dev/graph/badge.svg)](https://codecov.io/gh/Azure/azure-functions-python-worker) | ![CI Unit tests](https://github.com/Azure/azure-functions-python-worker/workflows/CI%20Unit%20tests/badge.svg?branch=dev) | ![CI E2E tests](https://github.com/Azure/azure-functions-python-worker/workflows/CI%20E2E%20tests/badge.svg?branch=dev) |

Python support for Azure Functions is based on Python 3.8, 3.9, 3.10, 3.11, and 3.12 serverless hosting on Linux and the Functions 4.0 runtime.
Python support for Azure Functions is based on Python 3.6, 3.7, 3.8, 3.9, and 3.10 serverless hosting on Linux and the Functions 2.0, 3.0 and 4.0 runtime.

Here is the current status of Python in Azure Functions:

What are the supported Python versions?

| Azure Functions Runtime | Python 3.8 | Python 3.9 | Python 3.10 | Python 3.11 | Python 3.12 |
|----------------------------------|------------|------------|-------------|-------------|-------------|
| Azure Functions 3.0 (deprecated) | ✔ | ✔ | - | - | - |
| Azure Functions 4.0 | ✔ | ✔ | ✔ | ✔ | ✔ |
| Azure Functions Runtime | Python 3.6 | Python 3.7 | Python 3.8 | Python 3.9 | Python 3.10 | Python 3.11 |
|----------------------------------|------------|------------|------------|------------|-------------|-------------|
| Azure Functions 2.0 (deprecated) | ✔ | ✔ | - | - | - | - |
| Azure Functions 3.0 (deprecated) | ✔ | ✔ | ✔ | ✔ | - | - |
| Azure Functions 4.0 | - | - | ✔ | ✔ | ✔ | ✔ |

For information about Azure Functions Runtime, please refer to [Azure Functions runtime versions overview](https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions) page.

### What's available?

- Build, test, debug, and publish using Azure Functions Core Tools (CLI) or Visual Studio Code
- Deploy Python Function project onto consumption, dedicated, elastic premium, or flex consumption plan.
- Deploy Python Function project in a custom docker image onto dedicated or elastic premium plan.
- Triggers / Bindings : Blob, Cosmos DB, Event Grid, Event Hub, HTTP, Kafka, MySQL, Queue, ServiceBus, SQL, Timer, and Warmup
- Build, test, debug and publish using Azure Functions Core Tools (CLI) or Visual Studio Code
- Deploy Python Function project onto consumption, dedicated, or elastic premium plan.
- Deploy Python Function project in a custom docker image onto dedicated, or elastic premium plan.
- Triggers / Bindings : HTTP, Blob, Queue, Timer, Cosmos DB, Event Grid, Event Hubs and Service Bus
- Triggers / Bindings : Custom binding support

### What's new?
What's coming?

- [SDK Type Bindings for Blob](https://techcommunity.microsoft.com/t5/azure-compute-blog/azure-functions-sdk-type-bindings-for-azure-blob-storage-with/ba-p/4146744)
- [HTTP Streaming](https://techcommunity.microsoft.com/t5/azure-compute-blog/azure-functions-support-for-http-streams-in-python-is-now-in/ba-p/4146697)
- [Durable Functions For Python](https://github.com/Azure/azure-functions-durable-python)

### Get Started

Expand Down Expand Up @@ -71,4 +72,4 @@ provided by the bot. You will only need to do this once across all repos using o

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
6 changes: 0 additions & 6 deletions azure_functions_worker/__main__.py

This file was deleted.

29 changes: 0 additions & 29 deletions azure_functions_worker/bindings/__init__.py

This file was deleted.

25 changes: 0 additions & 25 deletions azure_functions_worker/bindings/rpcexception.py

This file was deleted.

Loading
Loading