[Feature Request] Provide "workflow local"

Open
#719 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

Start by reviewing the linked Temporal feature request and the proposed workflow.LocalVar API, comparing its required methods and type-safety with Python's contextvars.ContextVar. Define the workflow-only scoping behavior and the API contract; done means the feature is specified well enough to implement and verify.

Written by the indexing model from the issue text.

Description

enhancement
Describe the solution you'd like

Users need a workflow-local var that is scoped only to the current workflow when accessed via code. See https://github.com/temporalio/features/issues/571.

Rough sketch: a user can have myValue = workflow.LocalVar("myValue"), and all methods and typesafety and such work like contextvars.ContextVar.

Dominant language
Python
Stars
1.2k
Forks
241
Avg merge
3d 2h
Merged PRs (30d)
49

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from temporalio/sdk-python

All issues in temporalio/sdk-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.