diff --git a/temporal-sample.yaml b/temporal-sample.yaml new file mode 100644 index 00000000..de9504a6 --- /dev/null +++ b/temporal-sample.yaml @@ -0,0 +1,191 @@ +version: 1 +language: python +scaffold: + pyproject.toml: | + [project] + name = "{{name}}" + version = "0.1.0" + requires-python = ">=3.10" + dependencies = [{{dependencies}}] + [build-system] + requires = ["hatchling"] + build-backend = "hatchling.build" + [tool.hatch.build.targets.wheel] + packages = ["{{sample}}"] +samples: + - path: hello + description: Basic hello world samples (activity, signal, query, etc.) + dependencies: + - temporalio>=1.23.0,<2 + - path: hello_standalone_activity + description: Execute Activities directly from a Client, without a Workflow + dependencies: + - temporalio>=1.23.0,<2 + - path: hello_nexus + description: Nexus service definition, operation handlers, and workflow calls + dependencies: + - temporalio>=1.23.0,<2 + - nexus-rpc>=1.1.0,<2 + - path: nexus_cancel + description: Fan out Nexus operations, take first result, cancel the rest + dependencies: + - temporalio>=1.23.0,<2 + - nexus-rpc>=1.1.0,<2 + - path: nexus_multiple_args + description: Map a Nexus operation to a handler workflow with multiple arguments + dependencies: + - temporalio>=1.23.0,<2 + - nexus-rpc>=1.1.0,<2 + - path: nexus_sync_operations + description: Nexus service backed by a long-running workflow with updates and queries + dependencies: + - temporalio>=1.23.0,<2 + - nexus-rpc>=1.1.0,<2 + - path: openai_agents + description: OpenAI Agents SDK with Temporal durable execution + dependencies: + - openai-agents[litellm]==0.3.2 + - temporalio[openai-agents]>=1.18.0 + - requests>=2.32.0,<3 + - path: langchain + description: Orchestrate LangChain workflows with LangSmith tracing + dependencies: + - langchain>=0.1.7,<0.2 + - langchain-openai>=0.0.6,<0.0.7 + - openai>=1.4.0,<2 + - path: bedrock + description: Amazon Bedrock AI chatbot with durable execution + dependencies: + - temporalio>=1.23.0,<2 + - boto3>=1.34.92,<2 + - path: encryption + description: End-to-end encryption codec, compatible with TypeScript and Go + dependencies: + - temporalio>=1.23.0,<2 + - cryptography>=38.0.1,<39 + - aiohttp>=3.8.1,<4 + - path: dsl + description: Workflow interpreter for arbitrary steps defined in YAML DSL + dependencies: + - temporalio>=1.23.0,<2 + - pyyaml>=6.0.1,<7 + - dacite>=1.8.1,<2 + - path: schedules + description: Schedule a Workflow Execution and control actions + dependencies: + - temporalio>=1.23.0,<2 + - path: activity_worker + description: Cross-language sample with a Go workflow calling a Python activity + dependencies: + - temporalio>=1.23.0,<2 + - path: batch_sliding_window + description: Batch processing with a sliding window of parallel child workflows + dependencies: + - temporalio>=1.23.0,<2 + - path: context_propagation + description: Propagate contextual information through workflows and activities via interceptors + dependencies: + - temporalio>=1.23.0,<2 + - path: custom_converter + description: Custom payload converter for types not natively supported by Temporal + dependencies: + - temporalio>=1.23.0,<2 + - path: custom_decorator + description: Auto-heartbeater decorator for automatic activity heartbeating + dependencies: + - temporalio>=1.23.0,<2 + - path: custom_metric + description: Custom Prometheus metric with an interceptor for activity schedule-to-start latency + dependencies: + - temporalio>=1.23.0,<2 + - path: eager_wf_start + description: Eager Workflow Start for low-latency first-task execution + dependencies: + - temporalio>=1.23.0,<2 + - path: env_config + description: Configure a Temporal Client from a TOML file with profile support + dependencies: + - temporalio>=1.23.0,<2 + - path: message_passing + description: Introduction to Query, Signal, and Update message-passing patterns + dependencies: + - temporalio>=1.23.0,<2 + - path: patching + description: Safely alter workflow code using patched and deprecate_patch in stages + dependencies: + - temporalio>=1.23.0,<2 + - path: polling + description: Best practices for frequent, infrequent, and periodic polling patterns + dependencies: + - temporalio>=1.23.0,<2 + - path: prometheus + description: Expose SDK Prometheus metrics via HTTP endpoint + dependencies: + - temporalio>=1.23.0,<2 + - path: replay + description: Verify workflow code changes are compatible with existing histories + dependencies: + - temporalio>=1.23.0,<2 + - path: resource_pool + description: Long-lived workflow for resource allocation and serialized access control + dependencies: + - temporalio>=1.23.0,<2 + - path: sleep_for_days + description: Long-running workflow that sends periodic emails with durable timers + dependencies: + - temporalio>=1.23.0,<2 + - path: updatable_timer + description: Blocking sleep that can be updated at any moment via signals + dependencies: + - temporalio>=1.23.0,<2 + - path: worker_multiprocessing + description: Run multiple workflow worker processes using ProcessPoolExecutor + dependencies: + - temporalio>=1.23.0,<2 + - path: worker_specific_task_queues + description: Pin activities to a specific worker using unique task queues + dependencies: + - temporalio>=1.23.0,<2 + - path: worker_versioning + description: Safe worker deployments with auto-upgrading and pinned workflow versions + dependencies: + - temporalio>=1.23.0,<2 + - path: cloud_export_to_parquet + description: Convert Temporal Cloud exported proto files to Parquet format + dependencies: + - temporalio>=1.23.0,<2 + - pandas>=2.2.2,<3 + - numpy>=1.26.0,<2 + - boto3>=1.34.89,<2 + - pyarrow>=19.0.1 + - path: gevent_async + description: Run Temporal in a gevent-patched environment with a custom executor + dependencies: + - temporalio>=1.23.0,<2 + - gevent>=25.4.2 + - path: open_telemetry + description: Configure OpenTelemetry to capture workflow traces and SDK metrics + dependencies: + - temporalio[opentelemetry]>=1.23.0,<2 + - opentelemetry-exporter-otlp-proto-grpc + - path: pydantic_converter + description: Use the Pydantic data converter for workflow and activity I/O + dependencies: + - temporalio>=1.23.0,<2 + - pydantic>=2.10.6,<3 + - path: pydantic_converter_v1 + description: Pydantic v1 data converter (use v2 pydantic_converter instead if possible) + dependencies: + - temporalio>=1.23.0,<2 + - pydantic>=2.10.6,<3 + - path: sentry + description: Capture workflow and activity errors with Sentry SDK v2 integration + dependencies: + - temporalio>=1.23.0,<2 + - sentry-sdk>=2.13.0 + - path: trio_async + description: Use Temporal asyncio with Trio via trio-asyncio bridge + dependencies: + - temporalio>=1.23.0,<2 + - trio>=0.28.0,<0.29 + - trio-asyncio>=0.15.0,<0.16