prefect-client 3.4.0__tar.gz → 3.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {prefect_client-3.4.0 → prefect_client-3.4.1}/PKG-INFO +2 -1
- {prefect_client-3.4.0 → prefect_client-3.4.1}/pyproject.toml +1 -0
- prefect_client-3.4.1/src/prefect/_build_info.py +5 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_experimental/bundles/__init__.py +1 -1
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/schemas/bases.py +11 -1
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/schemas/validators.py +0 -98
- prefect_client-3.4.1/src/prefect/_internal/uuid7.py +11 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/__init__.py +16 -8
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/schemas/actions.py +13 -35
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/schemas/objects.py +26 -22
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/subscriptions.py +18 -9
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/events/clients.py +6 -6
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/events/filters.py +25 -11
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/events/schemas/automations.py +3 -1
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/events/schemas/events.py +3 -2
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/flows.py +79 -28
- prefect_client-3.4.1/src/prefect/runner/_observers.py +60 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/runner/runner.py +71 -213
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/workers.py +3 -2
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/task_runners.py +2 -1
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/tasks.py +3 -2
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/types/__init__.py +24 -36
- prefect_client-3.4.1/src/prefect/types/names.py +139 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/dockerutils.py +18 -8
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/importtools.py +12 -4
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/workers/base.py +32 -10
- prefect_client-3.4.0/src/prefect/_build_info.py +0 -5
- {prefect_client-3.4.0 → prefect_client-3.4.1}/.gitignore +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/LICENSE +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/README.md +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/.prefectignore +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/__main__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_experimental/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_experimental/bundles/execute.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_experimental/lineage.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_experimental/sla/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_experimental/sla/client.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_experimental/sla/objects.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/_logging.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/compatibility/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/compatibility/async_dispatch.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/compatibility/deprecated.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/compatibility/migration.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/concurrency/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/concurrency/api.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/concurrency/calls.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/concurrency/cancellation.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/concurrency/event_loop.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/concurrency/inspection.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/concurrency/primitives.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/concurrency/services.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/concurrency/threads.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/concurrency/waiters.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/integrations.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/pydantic/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/pydantic/schemas.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/pydantic/v1_schema.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/pytz.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/retries.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/schemas/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/schemas/fields.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_internal/schemas/serializers.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_result_records.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_vendor/croniter/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_vendor/croniter/croniter.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_versioning.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/_waiters.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/agent.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/artifacts.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/automations.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/blocks/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/blocks/abstract.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/blocks/core.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/blocks/fields.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/blocks/notifications.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/blocks/redis.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/blocks/system.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/blocks/webhook.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/cache_policies.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/base.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/cloud.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/collections.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/constants.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_artifacts/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_artifacts/client.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_automations/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_automations/client.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_blocks_documents/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_blocks_documents/client.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_blocks_schemas/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_blocks_schemas/client.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_blocks_types/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_blocks_types/client.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_concurrency_limits/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_concurrency_limits/client.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_deployments/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_deployments/client.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_flow_runs/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_flow_runs/client.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_flows/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_flows/client.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_logs/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_logs/client.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_variables/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_variables/client.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_work_pools/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/_work_pools/client.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/base.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/orchestration/routes.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/schemas/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/schemas/filters.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/schemas/responses.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/schemas/schedules.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/schemas/sorting.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/types/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/types/flexible_schedule_list.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/client/utilities.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/concurrency/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/concurrency/_asyncio.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/concurrency/_events.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/concurrency/asyncio.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/concurrency/context.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/concurrency/services.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/concurrency/sync.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/concurrency/v1/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/concurrency/v1/_asyncio.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/concurrency/v1/_events.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/concurrency/v1/asyncio.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/concurrency/v1/context.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/concurrency/v1/services.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/concurrency/v1/sync.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/context.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/deployments/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/deployments/base.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/deployments/deployments.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/deployments/flow_runs.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/deployments/runner.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/deployments/schedules.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/deployments/steps/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/deployments/steps/core.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/deployments/steps/pull.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/deployments/steps/utility.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/docker/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/docker/docker_image.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/engine.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/events/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/events/actions.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/events/cli/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/events/cli/automations.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/events/related.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/events/schemas/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/events/schemas/deployment_triggers.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/events/schemas/labelling.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/events/utilities.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/events/worker.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/exceptions.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/filesystems.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/flow_engine.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/flow_runs.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/futures.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/infrastructure/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/infrastructure/base.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/infrastructure/provisioners/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/infrastructure/provisioners/cloud_run.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/infrastructure/provisioners/coiled.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/infrastructure/provisioners/container_instance.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/infrastructure/provisioners/ecs.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/infrastructure/provisioners/modal.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/input/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/input/actions.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/input/run_input.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/locking/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/locking/filesystem.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/locking/memory.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/locking/protocol.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/logging/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/logging/configuration.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/logging/filters.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/logging/formatters.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/logging/handlers.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/logging/highlighters.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/logging/loggers.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/logging/logging.yml +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/main.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/plugins.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/py.typed +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/results.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/runner/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/runner/server.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/runner/storage.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/runner/submit.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/runner/utils.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/runtime/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/runtime/deployment.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/runtime/flow_run.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/runtime/task_run.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/schedules.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/serializers.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/admin.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/artifacts.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/automations.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/block_capabilities.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/block_documents.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/block_schemas.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/block_types.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/clients.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/collections.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/concurrency_limits.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/concurrency_limits_v2.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/csrf_token.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/dependencies.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/deployments.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/events.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/flow_run_states.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/flow_runs.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/flows.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/logs.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/middleware.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/root.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/run_history.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/saved_searches.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/server.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/task_run_states.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/task_runs.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/task_workers.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/templates.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/ui/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/ui/flow_runs.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/ui/flows.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/ui/schemas.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/ui/task_runs.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/validation.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/variables.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/server/api/work_queues.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/base.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/constants.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/context.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/legacy.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/api.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/cli.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/client.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/cloud.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/deployments.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/experiments.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/flows.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/internal.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/logging.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/results.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/root.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/runner.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/server/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/server/api.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/server/database.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/server/deployments.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/server/ephemeral.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/server/events.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/server/flow_run_graph.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/server/root.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/server/services.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/server/tasks.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/server/ui.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/tasks.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/testing.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/models/worker.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/profiles.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/profiles.toml +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/settings/sources.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/states.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/task_engine.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/task_runs.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/task_worker.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/telemetry/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/telemetry/bootstrap.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/telemetry/instrumentation.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/telemetry/logging.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/telemetry/processors.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/telemetry/run_telemetry.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/telemetry/services.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/transactions.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/types/_datetime.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/types/entrypoint.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/_ast.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/_deprecated.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/_engine.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/_git.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/annotations.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/asyncutils.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/callables.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/collections.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/compat.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/context.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/dispatch.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/engine.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/filesystem.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/generics.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/hashing.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/math.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/names.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/processutils.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/pydantic.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/render_swagger.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/schema_tools/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/schema_tools/hydration.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/schema_tools/validation.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/services.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/slugify.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/templating.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/text.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/timeout.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/urls.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/utilities/visualization.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/variables.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/workers/__init__.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/workers/block.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/workers/cloud.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/workers/process.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/workers/server.py +0 -0
- {prefect_client-3.4.0 → prefect_client-3.4.1}/src/prefect/workers/utilities.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: prefect-client
|
3
|
-
Version: 3.4.
|
3
|
+
Version: 3.4.1
|
4
4
|
Summary: Workflow orchestration and management.
|
5
5
|
Project-URL: Changelog, https://github.com/PrefectHQ/prefect/releases
|
6
6
|
Project-URL: Documentation, https://docs.prefect.io
|
@@ -60,6 +60,7 @@ Requires-Dist: sniffio<2.0.0,>=1.3.0
|
|
60
60
|
Requires-Dist: toml>=0.10.0
|
61
61
|
Requires-Dist: typing-extensions<5.0.0,>=4.10.0
|
62
62
|
Requires-Dist: ujson<6.0.0,>=5.8.0
|
63
|
+
Requires-Dist: uuid7>=0.1.0
|
63
64
|
Requires-Dist: uvicorn!=0.29.0,>=0.14.0
|
64
65
|
Requires-Dist: websockets<16.0,>=13.0
|
65
66
|
Requires-Dist: whenever<0.9.0,>=0.7.3; python_version >= '3.13'
|
@@ -10,6 +10,7 @@ from pydantic import BaseModel, ConfigDict, Field
|
|
10
10
|
from rich.repr import RichReprResult
|
11
11
|
from typing_extensions import Self
|
12
12
|
|
13
|
+
from prefect._internal.uuid7 import uuid7
|
13
14
|
from prefect.types._datetime import (
|
14
15
|
DateTime,
|
15
16
|
human_friendly_diff,
|
@@ -100,7 +101,7 @@ class PrefectBaseModel(BaseModel):
|
|
100
101
|
|
101
102
|
class IDBaseModel(PrefectBaseModel):
|
102
103
|
"""
|
103
|
-
A PrefectBaseModel with
|
104
|
+
A PrefectBaseModel with a randomly-generated UUID ID value.
|
104
105
|
|
105
106
|
The ID is reset on copy() and not included in equality comparisons.
|
106
107
|
"""
|
@@ -109,6 +110,15 @@ class IDBaseModel(PrefectBaseModel):
|
|
109
110
|
id: UUID = Field(default_factory=uuid4)
|
110
111
|
|
111
112
|
|
113
|
+
class TimeSeriesBaseModel(IDBaseModel):
|
114
|
+
"""
|
115
|
+
A PrefectBaseModel with a time-oriented UUIDv7 ID value. Used for models that
|
116
|
+
operate like timeseries, such as runs, states, and logs.
|
117
|
+
"""
|
118
|
+
|
119
|
+
id: UUID = Field(default_factory=uuid7)
|
120
|
+
|
121
|
+
|
112
122
|
class ObjectBaseModel(IDBaseModel):
|
113
123
|
"""
|
114
124
|
A PrefectBaseModel with an auto-generated UUID ID value and created /
|
@@ -10,7 +10,6 @@ from __future__ import annotations
|
|
10
10
|
|
11
11
|
import datetime
|
12
12
|
import os
|
13
|
-
import re
|
14
13
|
import urllib.parse
|
15
14
|
import warnings
|
16
15
|
from collections.abc import Iterable, Mapping, MutableMapping
|
@@ -36,59 +35,6 @@ M = TypeVar("M", bound=Mapping[str, Any])
|
|
36
35
|
MM = TypeVar("MM", bound=MutableMapping[str, Any])
|
37
36
|
|
38
37
|
|
39
|
-
LOWERCASE_LETTERS_NUMBERS_AND_DASHES_ONLY_REGEX = "^[a-z0-9-]*$"
|
40
|
-
LOWERCASE_LETTERS_NUMBERS_AND_UNDERSCORES_REGEX = "^[a-z0-9_]*$"
|
41
|
-
|
42
|
-
|
43
|
-
@overload
|
44
|
-
def raise_on_name_alphanumeric_dashes_only(
|
45
|
-
value: str, field_name: str = ...
|
46
|
-
) -> str: ...
|
47
|
-
|
48
|
-
|
49
|
-
@overload
|
50
|
-
def raise_on_name_alphanumeric_dashes_only(
|
51
|
-
value: None, field_name: str = ...
|
52
|
-
) -> None: ...
|
53
|
-
|
54
|
-
|
55
|
-
def raise_on_name_alphanumeric_dashes_only(
|
56
|
-
value: Optional[str], field_name: str = "value"
|
57
|
-
) -> Optional[str]:
|
58
|
-
if value is not None and not bool(
|
59
|
-
re.match(LOWERCASE_LETTERS_NUMBERS_AND_DASHES_ONLY_REGEX, value)
|
60
|
-
):
|
61
|
-
raise ValueError(
|
62
|
-
f"{field_name} must only contain lowercase letters, numbers, and dashes."
|
63
|
-
)
|
64
|
-
return value
|
65
|
-
|
66
|
-
|
67
|
-
@overload
|
68
|
-
def raise_on_name_alphanumeric_underscores_only(
|
69
|
-
value: str, field_name: str = ...
|
70
|
-
) -> str: ...
|
71
|
-
|
72
|
-
|
73
|
-
@overload
|
74
|
-
def raise_on_name_alphanumeric_underscores_only(
|
75
|
-
value: None, field_name: str = ...
|
76
|
-
) -> None: ...
|
77
|
-
|
78
|
-
|
79
|
-
def raise_on_name_alphanumeric_underscores_only(
|
80
|
-
value: Optional[str], field_name: str = "value"
|
81
|
-
) -> Optional[str]:
|
82
|
-
if value is not None and not re.match(
|
83
|
-
LOWERCASE_LETTERS_NUMBERS_AND_UNDERSCORES_REGEX, value
|
84
|
-
):
|
85
|
-
raise ValueError(
|
86
|
-
f"{field_name} must only contain lowercase letters, numbers, and"
|
87
|
-
" underscores."
|
88
|
-
)
|
89
|
-
return value
|
90
|
-
|
91
|
-
|
92
38
|
def validate_values_conform_to_schema(
|
93
39
|
values: Optional[Mapping[str, Any]],
|
94
40
|
schema: Optional[Mapping[str, Any]],
|
@@ -610,47 +556,3 @@ def validate_working_dir(v: Optional[Path | str]) -> Optional[Path]:
|
|
610
556
|
if isinstance(v, str):
|
611
557
|
return relative_path_to_current_platform(v)
|
612
558
|
return v
|
613
|
-
|
614
|
-
|
615
|
-
### UNCATEGORIZED VALIDATORS ###
|
616
|
-
|
617
|
-
# the above categories seem to be getting a bit unwieldy, so this is a temporary
|
618
|
-
# catch-all for validators until we organize these into files
|
619
|
-
|
620
|
-
|
621
|
-
@overload
|
622
|
-
def validate_block_document_name(value: str) -> str: ...
|
623
|
-
|
624
|
-
|
625
|
-
@overload
|
626
|
-
def validate_block_document_name(value: None) -> None: ...
|
627
|
-
|
628
|
-
|
629
|
-
def validate_block_document_name(value: Optional[str]) -> Optional[str]:
|
630
|
-
if value is not None:
|
631
|
-
raise_on_name_alphanumeric_dashes_only(value, field_name="Block document name")
|
632
|
-
return value
|
633
|
-
|
634
|
-
|
635
|
-
def validate_artifact_key(value: str) -> str:
|
636
|
-
raise_on_name_alphanumeric_dashes_only(value, field_name="Artifact key")
|
637
|
-
return value
|
638
|
-
|
639
|
-
|
640
|
-
@overload
|
641
|
-
def validate_variable_name(value: str) -> str: ...
|
642
|
-
|
643
|
-
|
644
|
-
@overload
|
645
|
-
def validate_variable_name(value: None) -> None: ...
|
646
|
-
|
647
|
-
|
648
|
-
def validate_variable_name(value: Optional[str]) -> Optional[str]:
|
649
|
-
if value is not None:
|
650
|
-
raise_on_name_alphanumeric_underscores_only(value, field_name="Variable name")
|
651
|
-
return value
|
652
|
-
|
653
|
-
|
654
|
-
def validate_block_type_slug(value: str):
|
655
|
-
raise_on_name_alphanumeric_dashes_only(value, field_name="Block type slug")
|
656
|
-
return value
|
@@ -322,12 +322,16 @@ class PrefectClient(
|
|
322
322
|
if api_version is None:
|
323
323
|
api_version = SERVER_API_VERSION
|
324
324
|
httpx_settings["headers"].setdefault("X-PREFECT-API-VERSION", api_version)
|
325
|
-
if api_key
|
326
|
-
httpx_settings["headers"].setdefault("Authorization", f"Bearer {api_key}")
|
327
|
-
|
325
|
+
# Prioritize auth_string if provided, otherwise use api_key
|
328
326
|
if auth_string:
|
329
327
|
token = base64.b64encode(auth_string.encode("utf-8")).decode("utf-8")
|
330
|
-
httpx_settings["headers"]
|
328
|
+
httpx_settings["headers"]["Authorization"] = (
|
329
|
+
f"Basic {token}" # Overwrite if exists
|
330
|
+
)
|
331
|
+
elif api_key:
|
332
|
+
httpx_settings["headers"]["Authorization"] = (
|
333
|
+
f"Bearer {api_key}" # Set if auth_string is not present
|
334
|
+
)
|
331
335
|
|
332
336
|
# Context management
|
333
337
|
self._context_stack: int = 0
|
@@ -1189,12 +1193,16 @@ class SyncPrefectClient(
|
|
1189
1193
|
if api_version is None:
|
1190
1194
|
api_version = SERVER_API_VERSION
|
1191
1195
|
httpx_settings["headers"].setdefault("X-PREFECT-API-VERSION", api_version)
|
1192
|
-
if api_key
|
1193
|
-
httpx_settings["headers"].setdefault("Authorization", f"Bearer {api_key}")
|
1194
|
-
|
1196
|
+
# Prioritize auth_string if provided, otherwise use api_key
|
1195
1197
|
if auth_string:
|
1196
1198
|
token = base64.b64encode(auth_string.encode("utf-8")).decode("utf-8")
|
1197
|
-
httpx_settings["headers"]
|
1199
|
+
httpx_settings["headers"]["Authorization"] = (
|
1200
|
+
f"Basic {token}" # Overwrite if exists
|
1201
|
+
)
|
1202
|
+
elif api_key:
|
1203
|
+
httpx_settings["headers"]["Authorization"] = (
|
1204
|
+
f"Bearer {api_key}" # Set if auth_string is not present
|
1205
|
+
)
|
1198
1206
|
|
1199
1207
|
# Context management
|
1200
1208
|
self._context_stack: int = 0
|
@@ -12,12 +12,8 @@ from prefect._internal.schemas.bases import ActionBaseModel
|
|
12
12
|
from prefect._internal.schemas.validators import (
|
13
13
|
convert_to_strings,
|
14
14
|
remove_old_deployment_fields,
|
15
|
-
validate_artifact_key,
|
16
|
-
validate_block_document_name,
|
17
|
-
validate_block_type_slug,
|
18
15
|
validate_name_present_on_nonanonymous_blocks,
|
19
16
|
validate_schedule_max_scheduled_runs,
|
20
|
-
validate_variable_name,
|
21
17
|
)
|
22
18
|
from prefect.client.schemas.objects import (
|
23
19
|
StateDetails,
|
@@ -34,7 +30,6 @@ from prefect.client.schemas.schedules import (
|
|
34
30
|
from prefect.schedules import Schedule
|
35
31
|
from prefect.settings import PREFECT_DEPLOYMENT_SCHEDULE_MAX_SCHEDULED_RUNS
|
36
32
|
from prefect.types import (
|
37
|
-
MAX_VARIABLE_NAME_LENGTH,
|
38
33
|
DateTime,
|
39
34
|
KeyValueLabelsField,
|
40
35
|
Name,
|
@@ -45,6 +40,12 @@ from prefect.types import (
|
|
45
40
|
PositiveInteger,
|
46
41
|
StrictVariableValue,
|
47
42
|
)
|
43
|
+
from prefect.types.names import (
|
44
|
+
ArtifactKey,
|
45
|
+
BlockDocumentName,
|
46
|
+
BlockTypeSlug,
|
47
|
+
VariableName,
|
48
|
+
)
|
48
49
|
from prefect.utilities.collections import visit_collection
|
49
50
|
from prefect.utilities.pydantic import get_class_fields_only
|
50
51
|
|
@@ -216,7 +217,7 @@ class DeploymentCreate(ActionBaseModel):
|
|
216
217
|
flow_id: UUID = Field(..., description="The ID of the flow to deploy.")
|
217
218
|
paused: Optional[bool] = Field(default=None)
|
218
219
|
schedules: list[DeploymentScheduleCreate] = Field(
|
219
|
-
default_factory=
|
220
|
+
default_factory=lambda: [],
|
220
221
|
description="A list of schedules for the deployment.",
|
221
222
|
)
|
222
223
|
concurrency_limit: Optional[int] = Field(
|
@@ -537,7 +538,7 @@ class SavedSearchCreate(ActionBaseModel):
|
|
537
538
|
|
538
539
|
name: str = Field(default=..., description="The name of the saved search.")
|
539
540
|
filters: list[objects.SavedSearchFilter] = Field(
|
540
|
-
default_factory=
|
541
|
+
default_factory=lambda: [], description="The filter set for the saved search."
|
541
542
|
)
|
542
543
|
|
543
544
|
|
@@ -585,7 +586,7 @@ class BlockTypeCreate(ActionBaseModel):
|
|
585
586
|
"""Data used by the Prefect REST API to create a block type."""
|
586
587
|
|
587
588
|
name: str = Field(default=..., description="A block type's name")
|
588
|
-
slug:
|
589
|
+
slug: BlockTypeSlug = Field(default=..., description="A block type's slug")
|
589
590
|
logo_url: Optional[objects.HttpUrl] = Field(
|
590
591
|
default=None, description="Web URL for the block type's logo"
|
591
592
|
)
|
@@ -601,9 +602,6 @@ class BlockTypeCreate(ActionBaseModel):
|
|
601
602
|
description="A code snippet demonstrating use of the corresponding block",
|
602
603
|
)
|
603
604
|
|
604
|
-
# validators
|
605
|
-
_validate_slug_format = field_validator("slug")(validate_block_type_slug)
|
606
|
-
|
607
605
|
|
608
606
|
class BlockTypeUpdate(ActionBaseModel):
|
609
607
|
"""Data used by the Prefect REST API to update a block type."""
|
@@ -638,7 +636,7 @@ class BlockSchemaCreate(ActionBaseModel):
|
|
638
636
|
class BlockDocumentCreate(ActionBaseModel):
|
639
637
|
"""Data used by the Prefect REST API to create a block document."""
|
640
638
|
|
641
|
-
name: Optional[
|
639
|
+
name: Optional[BlockDocumentName] = Field(
|
642
640
|
default=None, description="The name of the block document"
|
643
641
|
)
|
644
642
|
data: dict[str, Any] = Field(
|
@@ -658,8 +656,6 @@ class BlockDocumentCreate(ActionBaseModel):
|
|
658
656
|
),
|
659
657
|
)
|
660
658
|
|
661
|
-
_validate_name_format = field_validator("name")(validate_block_document_name)
|
662
|
-
|
663
659
|
@model_validator(mode="before")
|
664
660
|
def validate_name_is_present_if_not_anonymous(
|
665
661
|
cls, values: dict[str, Any]
|
@@ -814,7 +810,7 @@ class WorkQueueUpdate(ActionBaseModel):
|
|
814
810
|
class ArtifactCreate(ActionBaseModel):
|
815
811
|
"""Data used by the Prefect REST API to create an artifact."""
|
816
812
|
|
817
|
-
key: Optional[
|
813
|
+
key: Optional[ArtifactKey] = Field(default=None)
|
818
814
|
type: Optional[str] = Field(default=None)
|
819
815
|
description: Optional[str] = Field(default=None)
|
820
816
|
data: Optional[Union[dict[str, Any], Any]] = Field(default=None)
|
@@ -822,8 +818,6 @@ class ArtifactCreate(ActionBaseModel):
|
|
822
818
|
flow_run_id: Optional[UUID] = Field(default=None)
|
823
819
|
task_run_id: Optional[UUID] = Field(default=None)
|
824
820
|
|
825
|
-
_validate_artifact_format = field_validator("key")(validate_artifact_key)
|
826
|
-
|
827
821
|
|
828
822
|
class ArtifactUpdate(ActionBaseModel):
|
829
823
|
"""Data used by the Prefect REST API to update an artifact."""
|
@@ -836,12 +830,7 @@ class ArtifactUpdate(ActionBaseModel):
|
|
836
830
|
class VariableCreate(ActionBaseModel):
|
837
831
|
"""Data used by the Prefect REST API to create a Variable."""
|
838
832
|
|
839
|
-
name:
|
840
|
-
default=...,
|
841
|
-
description="The name of the variable",
|
842
|
-
examples=["my_variable"],
|
843
|
-
max_length=MAX_VARIABLE_NAME_LENGTH,
|
844
|
-
)
|
833
|
+
name: VariableName = Field(default=...)
|
845
834
|
value: StrictVariableValue = Field(
|
846
835
|
default=...,
|
847
836
|
description="The value of the variable",
|
@@ -849,19 +838,11 @@ class VariableCreate(ActionBaseModel):
|
|
849
838
|
)
|
850
839
|
tags: Optional[list[str]] = Field(default=None)
|
851
840
|
|
852
|
-
# validators
|
853
|
-
_validate_name_format = field_validator("name")(validate_variable_name)
|
854
|
-
|
855
841
|
|
856
842
|
class VariableUpdate(ActionBaseModel):
|
857
843
|
"""Data used by the Prefect REST API to update a Variable."""
|
858
844
|
|
859
|
-
name: Optional[
|
860
|
-
default=None,
|
861
|
-
description="The name of the variable",
|
862
|
-
examples=["my_variable"],
|
863
|
-
max_length=MAX_VARIABLE_NAME_LENGTH,
|
864
|
-
)
|
845
|
+
name: Optional[VariableName] = Field(default=None)
|
865
846
|
value: StrictVariableValue = Field(
|
866
847
|
default=None,
|
867
848
|
description="The value of the variable",
|
@@ -869,9 +850,6 @@ class VariableUpdate(ActionBaseModel):
|
|
869
850
|
)
|
870
851
|
tags: Optional[list[str]] = Field(default=None)
|
871
852
|
|
872
|
-
# validators
|
873
|
-
_validate_name_format = field_validator("name")(validate_variable_name)
|
874
|
-
|
875
853
|
|
876
854
|
class GlobalConcurrencyLimitCreate(ActionBaseModel):
|
877
855
|
"""Data used by the Prefect REST API to create a global concurrency limit."""
|
@@ -15,10 +15,11 @@ from typing import (
|
|
15
15
|
Union,
|
16
16
|
overload,
|
17
17
|
)
|
18
|
-
from uuid import UUID
|
18
|
+
from uuid import UUID
|
19
19
|
|
20
20
|
import orjson
|
21
21
|
from pydantic import (
|
22
|
+
AfterValidator,
|
22
23
|
ConfigDict,
|
23
24
|
Discriminator,
|
24
25
|
Field,
|
@@ -35,20 +36,23 @@ from typing_extensions import Literal, Self, TypeVar
|
|
35
36
|
|
36
37
|
from prefect._internal.compatibility.async_dispatch import async_dispatch
|
37
38
|
from prefect._internal.compatibility.migration import getattr_migration
|
38
|
-
from prefect._internal.schemas.bases import
|
39
|
+
from prefect._internal.schemas.bases import (
|
40
|
+
ObjectBaseModel,
|
41
|
+
PrefectBaseModel,
|
42
|
+
TimeSeriesBaseModel,
|
43
|
+
)
|
39
44
|
from prefect._internal.schemas.fields import CreatedBy, UpdatedBy
|
40
45
|
from prefect._internal.schemas.validators import (
|
41
46
|
get_or_create_run_name,
|
42
47
|
list_length_50_or_less,
|
43
|
-
raise_on_name_alphanumeric_dashes_only,
|
44
48
|
set_run_policy_deprecated_fields,
|
45
|
-
validate_block_document_name,
|
46
49
|
validate_default_queue_id_not_none,
|
47
50
|
validate_max_metadata_length,
|
48
51
|
validate_name_present_on_nonanonymous_blocks,
|
49
52
|
validate_not_negative,
|
50
53
|
validate_parent_and_ref_diff,
|
51
54
|
)
|
55
|
+
from prefect._internal.uuid7 import uuid7
|
52
56
|
from prefect._result_records import ResultRecordMetadata
|
53
57
|
from prefect.client.schemas.schedules import SCHEDULE_TYPES
|
54
58
|
from prefect.settings import PREFECT_CLOUD_API_URL, PREFECT_CLOUD_UI_URL
|
@@ -61,6 +65,10 @@ from prefect.types import (
|
|
61
65
|
StrictVariableValue,
|
62
66
|
)
|
63
67
|
from prefect.types._datetime import DateTime, now
|
68
|
+
from prefect.types.names import (
|
69
|
+
BlockDocumentName,
|
70
|
+
raise_on_name_alphanumeric_dashes_only,
|
71
|
+
)
|
64
72
|
from prefect.utilities.asyncutils import run_coro_as_sync
|
65
73
|
from prefect.utilities.collections import AutoEnum, visit_collection
|
66
74
|
from prefect.utilities.names import generate_slug
|
@@ -181,7 +189,7 @@ def data_discriminator(x: Any) -> str:
|
|
181
189
|
return "Any"
|
182
190
|
|
183
191
|
|
184
|
-
class State(ObjectBaseModel, Generic[R]):
|
192
|
+
class State(TimeSeriesBaseModel, ObjectBaseModel, Generic[R]):
|
185
193
|
"""
|
186
194
|
The state of a run.
|
187
195
|
"""
|
@@ -412,7 +420,7 @@ class State(ObjectBaseModel, Generic[R]):
|
|
412
420
|
"""
|
413
421
|
return self.model_copy(
|
414
422
|
update={
|
415
|
-
"id":
|
423
|
+
"id": uuid7(),
|
416
424
|
"created": now("UTC"),
|
417
425
|
"updated": now("UTC"),
|
418
426
|
"timestamp": now("UTC"),
|
@@ -508,7 +516,7 @@ class FlowRunPolicy(PrefectBaseModel):
|
|
508
516
|
return values
|
509
517
|
|
510
518
|
|
511
|
-
class FlowRun(ObjectBaseModel):
|
519
|
+
class FlowRun(TimeSeriesBaseModel, ObjectBaseModel):
|
512
520
|
name: str = Field(
|
513
521
|
default_factory=lambda: generate_slug(2),
|
514
522
|
description=(
|
@@ -764,7 +772,7 @@ class Constant(TaskRunInput):
|
|
764
772
|
type: str
|
765
773
|
|
766
774
|
|
767
|
-
class TaskRun(ObjectBaseModel):
|
775
|
+
class TaskRun(TimeSeriesBaseModel, ObjectBaseModel):
|
768
776
|
name: str = Field(
|
769
777
|
default_factory=lambda: generate_slug(2), examples=["my-task-run"]
|
770
778
|
)
|
@@ -1000,7 +1008,7 @@ class BlockSchema(ObjectBaseModel):
|
|
1000
1008
|
class BlockDocument(ObjectBaseModel):
|
1001
1009
|
"""An ORM representation of a block document."""
|
1002
1010
|
|
1003
|
-
name: Optional[
|
1011
|
+
name: Optional[BlockDocumentName] = Field(
|
1004
1012
|
default=None,
|
1005
1013
|
description=(
|
1006
1014
|
"The block document's name. Not required for anonymous block documents."
|
@@ -1029,8 +1037,6 @@ class BlockDocument(ObjectBaseModel):
|
|
1029
1037
|
),
|
1030
1038
|
)
|
1031
1039
|
|
1032
|
-
_validate_name_format = field_validator("name")(validate_block_document_name)
|
1033
|
-
|
1034
1040
|
@model_validator(mode="before")
|
1035
1041
|
@classmethod
|
1036
1042
|
def validate_name_is_present_if_not_anonymous(
|
@@ -1133,7 +1139,8 @@ class Deployment(ObjectBaseModel):
|
|
1133
1139
|
default=None, description="The concurrency limit for the deployment."
|
1134
1140
|
)
|
1135
1141
|
schedules: list[DeploymentSchedule] = Field(
|
1136
|
-
default_factory=
|
1142
|
+
default_factory=lambda: [],
|
1143
|
+
description="A list of schedules for the deployment.",
|
1137
1144
|
)
|
1138
1145
|
job_variables: dict[str, Any] = Field(
|
1139
1146
|
default_factory=dict,
|
@@ -1219,7 +1226,7 @@ class ConcurrencyLimit(ObjectBaseModel):
|
|
1219
1226
|
)
|
1220
1227
|
concurrency_limit: int = Field(default=..., description="The concurrency limit.")
|
1221
1228
|
active_slots: list[UUID] = Field(
|
1222
|
-
default_factory=
|
1229
|
+
default_factory=lambda: [],
|
1223
1230
|
description="A list of active run ids using a concurrency slot",
|
1224
1231
|
)
|
1225
1232
|
|
@@ -1300,11 +1307,12 @@ class SavedSearch(ObjectBaseModel):
|
|
1300
1307
|
|
1301
1308
|
name: str = Field(default=..., description="The name of the saved search.")
|
1302
1309
|
filters: list[SavedSearchFilter] = Field(
|
1303
|
-
default_factory=
|
1310
|
+
default_factory=lambda: [],
|
1311
|
+
description="The filter set for the saved search.",
|
1304
1312
|
)
|
1305
1313
|
|
1306
1314
|
|
1307
|
-
class Log(ObjectBaseModel):
|
1315
|
+
class Log(TimeSeriesBaseModel, ObjectBaseModel):
|
1308
1316
|
"""An ORM representation of log data."""
|
1309
1317
|
|
1310
1318
|
name: str = Field(default=..., description="The logger name.")
|
@@ -1644,7 +1652,9 @@ class Variable(ObjectBaseModel):
|
|
1644
1652
|
|
1645
1653
|
class FlowRunInput(ObjectBaseModel):
|
1646
1654
|
flow_run_id: UUID = Field(description="The flow run ID associated with the input.")
|
1647
|
-
key: str = Field(
|
1655
|
+
key: Annotated[str, AfterValidator(raise_on_name_alphanumeric_dashes_only)] = Field(
|
1656
|
+
description="The key of the input."
|
1657
|
+
)
|
1648
1658
|
value: str = Field(description="The value of the input.")
|
1649
1659
|
sender: Optional[str] = Field(default=None, description="The sender of the input.")
|
1650
1660
|
|
@@ -1658,12 +1668,6 @@ class FlowRunInput(ObjectBaseModel):
|
|
1658
1668
|
"""
|
1659
1669
|
return orjson.loads(self.value)
|
1660
1670
|
|
1661
|
-
@field_validator("key", check_fields=False)
|
1662
|
-
@classmethod
|
1663
|
-
def validate_name_characters(cls, v: str) -> str:
|
1664
|
-
raise_on_name_alphanumeric_dashes_only(v)
|
1665
|
-
return v
|
1666
|
-
|
1667
1671
|
|
1668
1672
|
class GlobalConcurrencyLimit(ObjectBaseModel):
|
1669
1673
|
"""An ORM representation of a global concurrency limit"""
|
@@ -13,7 +13,7 @@ from typing_extensions import Self
|
|
13
13
|
from prefect._internal.schemas.bases import IDBaseModel
|
14
14
|
from prefect.events.clients import websocket_connect
|
15
15
|
from prefect.logging import get_logger
|
16
|
-
from prefect.settings import
|
16
|
+
from prefect.settings import get_current_settings
|
17
17
|
|
18
18
|
logger: Logger = get_logger(__name__)
|
19
19
|
|
@@ -76,10 +76,17 @@ class Subscription(Generic[S]):
|
|
76
76
|
websocket = await self._connect.__aenter__()
|
77
77
|
|
78
78
|
try:
|
79
|
+
settings = get_current_settings()
|
80
|
+
auth_token = (
|
81
|
+
settings.api.auth_string.get_secret_value()
|
82
|
+
if settings.api.auth_string
|
83
|
+
else None
|
84
|
+
)
|
85
|
+
api_key = settings.api.key.get_secret_value() if settings.api.key else None
|
86
|
+
token = auth_token or api_key # Prioritize auth_token
|
87
|
+
|
79
88
|
await websocket.send(
|
80
|
-
orjson.dumps(
|
81
|
-
{"type": "auth", "token": PREFECT_API_KEY.value()}
|
82
|
-
).decode()
|
89
|
+
orjson.dumps({"type": "auth", "token": token}).decode()
|
83
90
|
)
|
84
91
|
|
85
92
|
auth: dict[str, Any] = orjson.loads(await websocket.recv())
|
@@ -107,11 +114,13 @@ class Subscription(Generic[S]):
|
|
107
114
|
reason = None
|
108
115
|
|
109
116
|
if reason:
|
110
|
-
|
111
|
-
"Unable to authenticate to the subscription. Please "
|
112
|
-
"
|
113
|
-
|
114
|
-
|
117
|
+
error_message = (
|
118
|
+
"Unable to authenticate to the subscription. Please ensure the provided "
|
119
|
+
"`PREFECT_API_AUTH_STRING` (for self-hosted with auth string) or "
|
120
|
+
"`PREFECT_API_KEY` (for Cloud or self-hosted with API key) "
|
121
|
+
f"you are using is valid for this environment. Reason: {reason}"
|
122
|
+
)
|
123
|
+
raise Exception(error_message) from e
|
115
124
|
raise
|
116
125
|
else:
|
117
126
|
self._websocket = websocket
|
@@ -251,8 +251,8 @@ class EventsClient(abc.ABC):
|
|
251
251
|
|
252
252
|
async def __aexit__(
|
253
253
|
self,
|
254
|
-
exc_type: Optional[Type[
|
255
|
-
exc_val: Optional[
|
254
|
+
exc_type: Optional[Type[BaseException]],
|
255
|
+
exc_val: Optional[BaseException],
|
256
256
|
exc_tb: Optional[TracebackType],
|
257
257
|
) -> None:
|
258
258
|
del self._in_context
|
@@ -360,8 +360,8 @@ class PrefectEventsClient(EventsClient):
|
|
360
360
|
|
361
361
|
async def __aexit__(
|
362
362
|
self,
|
363
|
-
exc_type: Optional[Type[
|
364
|
-
exc_val: Optional[
|
363
|
+
exc_type: Optional[Type[BaseException]],
|
364
|
+
exc_val: Optional[BaseException],
|
365
365
|
exc_tb: Optional[TracebackType],
|
366
366
|
) -> None:
|
367
367
|
self._websocket = None
|
@@ -684,8 +684,8 @@ class PrefectEventSubscriber:
|
|
684
684
|
|
685
685
|
async def __aexit__(
|
686
686
|
self,
|
687
|
-
exc_type: Optional[Type[
|
688
|
-
exc_val: Optional[
|
687
|
+
exc_type: Optional[Type[BaseException]],
|
688
|
+
exc_val: Optional[BaseException],
|
689
689
|
exc_tb: Optional[TracebackType],
|
690
690
|
) -> None:
|
691
691
|
self._websocket = None
|