Coder Social home page Coder Social logo

imaduddinamajid / azure-functions-durable-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure/azure-functions-durable-python

0.0 1.0 0.0 5.29 MB

Python library for using the Durable Functions bindings.

License: MIT License

Python 99.67% Shell 0.33%

azure-functions-durable-python's Introduction

Branch Status
master Build Status
dev Build Status

Durable Functions for Python

The azure-functions-durable pip package allows you to write Durable Functions for Python. Durable Functions is an extension of Azure Functions that lets you write stateful functions and workflows in a serverless environment. The extension manages state, checkpoints, and restarts for you. Durable Functions' advantages include:

  • Define workflows in code. No JSON schemas or designers are needed.
  • Call other functions synchronously and asynchronously. Output from called functions can be saved to local variables.
  • Automatically checkpoint progress whenever the function schedules async work. Local state is never lost if the process recycles or the VM reboots.

You can find more information at the following links:

A durable function, or orchestration, is a solution made up of different types of Azure Functions:

  • Activity: the functions and tasks being orchestrated by your workflow.
  • Orchestrator: a function that describes the way and order actions are executed in code.
  • Client: the entry point for creating an instance of a durable orchestration.

Durable Functions' function types and features are documented in-depth here.

Current limitations

Python support for Durable Functions is currently in public preview. The following are the current known limitations.

Functionality

  • Sub-orchestrations are not yet supported (planned #62)
  • Durable Entities are not yet supported (not yet planned #96)

Tooling

Getting Started

Follow these instructions to get started with Durable Functions in Python:

๐Ÿš€ Python Durable Functions quickstart

Samples

Take a look at this project's samples directory:

Orchestrator example

import azure.durable_functions as df


def orchestrator_function(context: df.DurableOrchestrationContext):
    task1 = yield context.call_activity("DurableActivity", "One")
    task2 = yield context.call_activity("DurableActivity", "Two")
    task3 = yield context.call_activity("DurableActivity", "Three")

    outputs = [task1, task2, task3]
    return outputs


main = df.Orchestrator.create(orchestrator_function)

azure-functions-durable-python's People

Contributors

anthonychu avatar asedighi avatar codepossible avatar davidmrdavid avatar hazhzeng avatar microsoftopensource avatar msftgits avatar priyaananthasankar avatar scgbear avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.