Skip to content

Files

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Latest commit

Apr 15, 2025
ece6592 · Apr 15, 2025

History

History
58 lines (45 loc) · 2.85 KB
·

File metadata and controls

58 lines (45 loc) · 2.85 KB
·
page_type languages products urlFragment
sample
python
azure
azure-functions
azure-functions-extensions
azurefunctions-extensions-bindings-eventhub
extension-eventhub-samples

Azure Functions Extension EventHub library for Python samples

These are code samples that show common scenario operations with the Azure Functions Extension EventHub library.

These samples relate to the Azure EventHub library being used as part of a Python Function App. For examples on how to use the Azure EventHub library, please see Azure EventHub samples.

Prerequisites

Setup

  1. Install Core Tools
  2. Install the Azure Functions Extension EventHub library for Python with pip:
pip install azurefunctions-extensions-bindings-eventhub
  1. Clone or download this sample repository
  2. Open the sample folder in Visual Studio Code or your IDE of choice.

Running the samples

  1. Open a terminal window and cd to the directory that the sample you wish to run is saved in.
  2. Set the environment variables specified in the sample file you wish to run.
  3. Install the required dependencies
pip install -r requirements.txt
  1. Start the Functions runtime
func start
  1. Execute the function by uploading an event to the EventHub that is being targeted.

Next steps

Visit the SDK-type bindings in Python reference documentation to learn more about how to use SDK-type bindings in a Python Function App and the API reference documentation to learn more about what you can do with the Azure EventHub library.