This release is a pre-release and may not be stable for production use.
Azure Functions Extensions Connectors Office365 library for Python
This library allows Office365 Connector Triggers in Python Function Apps to recognize and bind to client types from the Azure Connectors SDK.
Office365 client types can be generated from:
- Office365 Connector Triggers
Source code | Package (PyPi) | API reference documentation | Product documentation | Samples
Getting started
Prerequisites
-
Python 3.9 or later is required to use this package. For more details, please read our page on Python Functions version support policy.
-
You must have an Azure subscription and an Office365 account to use this package.
Install the package
Install the Azure Functions Extensions Connectors Office365 library for Python with pip:
pip install azurefunctions-extensions-connectors-office365
Bind to the SDK-type
The Azure Functions Extensions Connectors Office365 library for Python allows you to create a function app with an Office365 Connector Trigger and define the type as a ClientReceiveMessage or List[ClientReceiveMessage]. Instead of receiving raw data, when the function is executed, the type returned will be the defined SDK-type and have all of the methods available from the azure-connectors SDK.
Key concepts
ClientReceiveMessage
The ClientReceiveMessage type represents a message received from an Office365 connector. The extension automatically parses the incoming JSON payload and converts it into typed ClientReceiveMessage objects from the azure-connectors SDK.
Cardinality
Office365 Connector Triggers support both single and batch message processing:
- Single message (cardinality=one): Annotate your function parameter as
ClientReceiveMessageto receive one message per function invocation - Batch messages (cardinality=many): Annotate your function parameter as
List[ClientReceiveMessage]to receive multiple messages in a single function invocation
Examples
Office365 Connector Trigger - Single Message
import logging
import azure.functions as func
import azurefunctions.extensions.connectors.office365 as office365
app = func.FunctionApp()
@app.connector_trigger(arg_name="message", connection="OFFICE365_CONNECTION")
def office365_trigger_single(message: office365.ClientReceiveMessage):
logging.info(f"Received Office365 message: {message}")
# Access message properties using the Azure Connectors SDK methods
Office365 Connector Trigger - Batch Messages
import logging
from typing import List
import azure.functions as func
import azurefunctions.extensions.connectors.office365 as office365
app = func.FunctionApp()
@app.connector_trigger(arg_name="messages", connection="OFFICE365_CONNECTION")
def office365_trigger_batch(messages: List[office365.ClientReceiveMessage]):
logging.info(f"Received {len(messages)} Office365 messages")
for message in messages:
logging.info(f"Processing message: {message}")
# Access message properties using the Azure Connectors SDK methods
Troubleshooting
General
Office365 Connector extension errors will be raised as ValueError exceptions with descriptive error messages.
Logging
Enable verbose logging in your function app to see detailed information about message processing:
import logging
logging.basicConfig(level=logging.INFO)
Next steps
More sample code
Get started with our Office365 Connector samples.
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Metadata
Release files for azurefunctions-extensions-connectors 1.0.0b3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| azurefunctions_extensions_connectors-1.0.0b3.tar.gz | 11.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| azurefunctions_extensions_connectors-1.0.0b3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.6 kB
Release files / azurefunctions_extensions_connectors-1.0.0b3.tar.gz
| Download URL | azurefunctions_extensions_connectors-1.0.0b3.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2b28e2e13dce5e5566912edcce50e5fe69b278b909df12f15dbf7daf03d14aa
|
|
BLAKE2b-256 checksum How to use checksums |
354cd1d3ad988e04516e4cffaf1c0f6c656792e04b02dd5d692da7d1b4082124
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Release files / azurefunctions_extensions_connectors-1.0.0b3-py3-none-any.whl
| Download URL | azurefunctions_extensions_connectors-1.0.0b3-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04f3bcaebad376bc57f0eb4a5c7e52dcb3206f98572156d8f3f7892ee4be34f3
|
|
BLAKE2b-256 checksum How to use checksums |
df9b90d3088ba893cacdfb83c6f479dc194999eb2e71fa9bc277f32324cda272
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Security for azurefunctions-extensions-connectors 1.0.0b3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.