{"id":13542924,"url":"https://github.com/temporalio/samples-python","last_synced_at":"2025-04-02T12:30:51.211Z","repository":{"id":37956778,"uuid":"454557884","full_name":"temporalio/samples-python","owner":"temporalio","description":"Samples for working with the Temporal Python SDK","archived":false,"fork":false,"pushed_at":"2024-09-16T19:34:10.000Z","size":839,"stargazers_count":119,"open_issues_count":41,"forks_count":53,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-09-17T01:39:51.823Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/temporalio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-01T21:31:45.000Z","updated_at":"2024-09-16T17:41:21.000Z","dependencies_parsed_at":"2024-06-04T22:43:32.761Z","dependency_job_id":"08f9c311-5bf6-40be-ba22-38c446e952d3","html_url":"https://github.com/temporalio/samples-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsamples-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsamples-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsamples-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsamples-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/temporalio","download_url":"https://codeload.github.com/temporalio/samples-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246815307,"owners_count":20838420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T11:00:19.858Z","updated_at":"2025-04-02T12:30:46.203Z","avatar_url":"https://github.com/temporalio.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":["Samples"],"readme":"# Temporal Python SDK Samples\n\nThis is the set of Python samples for the [Python SDK](https://github.com/temporalio/sdk-python).\n\n## Usage\n\nPrerequisites:\n\n* Python \u003e= 3.8\n* [Poetry](https://python-poetry.org)\n* [Temporal CLI installed](https://docs.temporal.io/cli#install)\n* [Local Temporal server running](https://docs.temporal.io/cli/server#start-dev)\n\nWith this repository cloned, run the following at the root of the directory:\n\n    poetry install\n\nThat loads all required dependencies. Then to run a sample, usually you just run it in Python. For example:\n\n    poetry run python hello/hello_activity.py\n\nSome examples require extra dependencies. See each sample's directory for specific instructions.\n\n## Samples\n\n* [hello](hello) - All of the basic features.\n  \u003c!-- Keep this list in alphabetical order and in sync on hello/README.md and root README.md --\u003e\n  * [hello_activity](hello/hello_activity.py) - Execute an activity from a workflow.\n  * [hello_activity_choice](hello/hello_activity_choice.py) - Execute certain activities inside a workflow based on\n    dynamic input.\n  * [hello_activity_method](hello/hello_activity_method.py) - Demonstrate an activity that is an instance method on a\n    class and can access class state.\n  * [hello_activity_multiprocess](hello/hello_activity_multiprocess.py) - Execute a synchronous activity on a process\n    pool.\n  * [hello_activity_retry](hello/hello_activity_retry.py) - Demonstrate activity retry by failing until a certain number\n    of attempts.\n  * [hello_activity_threaded](hello/hello_activity_threaded.py) - Execute a synchronous activity on a thread pool.\n  * [hello_async_activity_completion](hello/hello_async_activity_completion.py) - Complete an activity outside of the\n    function that was called.\n  * [hello_cancellation](hello/hello_cancellation.py) - Manually react to cancellation inside workflows and activities.\n  * [hello_child_workflow](hello/hello_child_workflow.py) - Execute a child workflow from a workflow.\n  * [hello_continue_as_new](hello/hello_continue_as_new.py) - Use continue as new to restart a workflow.\n  * [hello_cron](hello/hello_cron.py) - Execute a workflow once a minute.\n  * [hello_exception](hello/hello_exception.py) - Execute an activity that raises an error out of the workflow and out\n    of the program.\n  * [hello_local_activity](hello/hello_local_activity.py) - Execute a local activity from a workflow.\n  * [hello_mtls](hello/hello_mtls.py) - Accept URL, namespace, and certificate info as CLI args and use mTLS for\n    connecting to server.\n  * [hello_parallel_activity](hello/hello_parallel_activity.py) - Execute multiple activities at once.\n  * [hello_query](hello/hello_query.py) - Invoke queries on a workflow.\n  * [hello_search_attributes](hello/hello_search_attributes.py) - Start workflow with search attributes then change\n    while running.\n  * [hello_signal](hello/hello_signal.py) - Send signals to a workflow.\n\u003c!-- Keep this list in alphabetical order --\u003e\n* [activity_worker](activity_worker) - Use Python activities from a workflow in another language.\n* [bedrock](bedrock) - Orchestrate a chatbot with Amazon Bedrock.\n* [cloud_export_to_parquet](cloud_export_to_parquet) - Set up schedule workflow to process exported files on an hourly basis\n* [context_propagation](context_propagation) - Context propagation through workflows/activities via interceptor.\n* [custom_converter](custom_converter) - Use a custom payload converter to handle custom types.\n* [custom_decorator](custom_decorator) - Custom decorator to auto-heartbeat a long-running activity.\n* [dsl](dsl) - DSL workflow that executes steps defined in a YAML file.\n* [encryption](encryption) - Apply end-to-end encryption for all input/output.\n* [gevent_async](gevent_async) - Combine gevent and Temporal.\n* [langchain](langchain) - Orchestrate workflows for LangChain.\n* [message-passing introduction](message_passing/introduction/) - Introduction to queries, signals, and updates.\n* [open_telemetry](open_telemetry) - Trace workflows with OpenTelemetry.\n* [patching](patching) - Alter workflows safely with `patch` and `deprecate_patch`.\n* [polling](polling) - Recommended implementation of an activity that needs to periodically poll an external resource waiting its successful completion.\n* [prometheus](prometheus) - Configure Prometheus metrics on clients/workers.\n* [pydantic_converter](pydantic_converter) - Data converter for using Pydantic models.\n* [safe_message_handlers](message_passing/safe_message_handlers/) - Safely handling updates and signals.\n* [schedules](schedules) - Demonstrates a Workflow Execution that occurs according to a schedule.\n* [sentry](sentry) - Report errors to Sentry.\n* [worker_specific_task_queues](worker_specific_task_queues) - Use unique task queues to ensure activities run on specific workers.\n* [worker_versioning](worker_versioning) - Use the Worker Versioning feature to more easily version your workflows \u0026 other code.\n\n## Test\n\nRunning the tests requires `poe` to be installed.\n\n    python -m pip install poethepoet\n\nOnce you have `poe` installed you can run:\n\n    poe test\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemporalio%2Fsamples-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftemporalio%2Fsamples-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemporalio%2Fsamples-python/lists"}