---
name: infra-core-azure-functions-jobs
description: Use when working with infra-core Azure Function clients, CLI wiring, or Azure Table-backed job tracking. Covers AzureFunctionAsyncClient, AzureFunctionSyncClient, RequestOptions, add_azure_service_arguments, AzureTableJobStore, and TableConfig.
---

# infra-core-azure-functions-jobs

Use this skill when the task is about calling Azure Functions, wiring shared CLI flags, or persisting per-job state in Azure Table Storage through infra-core.

## Preferred imports

- `from infra_core.azure import AzureFunctionAsyncClient, AzureFunctionSyncClient, RequestOptions`
- `from infra_core.azure import add_azure_service_arguments`
- `from infra_core.azure import AzureTableJobStore, TableConfig`

## Selection guide

- Use `AzureFunctionAsyncClient` for async services, workers, and tests.
- Use `AzureFunctionSyncClient` only for sync scripts or CLIs that need to call the same async-backed flow.
- Use `RequestOptions` for per-call timeout/retry/backoff overrides instead of duplicating client setup.
- Use `add_azure_service_arguments()` to keep CLI/env flag wiring consistent across services.
- Use `AzureTableJobStore` when job state naturally maps to `(batch_id, job_id)` records with `to_entity()` / `from_entity()` conversion.

## Important behavior

- Azure helpers require the `infra-core[azure]` extra.
- Close sync function clients when you own them; they run a dedicated background event loop.
- `TableConfig.from_env()` accepts an explicit `env` mapping and can fall back to `AZURE_STORAGE_CONNECTION_STRING`.
- `AzureTableJobStore.list_runs()` sorts records within each returned page, not globally across continuation tokens.
- Prefer the job-store API over building Azure Table OData filters by hand.
- If you add a new public helper in this area, update `CAPABILITIES.md` and `src/infra_core/capabilities.py`.

## Read next when needed

- [CAPABILITIES.md](../../CAPABILITIES.md)
- [README.md](../../README.md)
- [src/infra_core/azure/client.py](../../src/infra_core/azure/client.py)
- [src/infra_core/azure/function_cli.py](../../src/infra_core/azure/function_cli.py)
- [src/infra_core/azure/job_store.py](../../src/infra_core/azure/job_store.py)
- [examples/azure_function_and_job_store.py](../../examples/azure_function_and_job_store.py)
- [tests/azure/test_client.py](../../tests/azure/test_client.py)
- [tests/azure/test_job_store.py](../../tests/azure/test_job_store.py)
- [tests/test_azure_job_store.py](../../tests/test_azure_job_store.py)
