prefect-client 2.18.0__tar.gz → 2.18.2__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-2.18.0/src/prefect_client.egg-info → prefect-client-2.18.2}/PKG-INFO +1 -1
- {prefect-client-2.18.0 → prefect-client-2.18.2}/requirements-dev.txt +5 -1
- {prefect-client-2.18.0 → prefect-client-2.18.2}/setup.cfg +6 -8
- prefect-client-2.18.2/src/prefect/_internal/schemas/fields.py +70 -0
- prefect-client-2.18.2/src/prefect/automations.py +162 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/blocks/core.py +1 -1
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/blocks/notifications.py +2 -2
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/blocks/system.py +2 -3
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/client/orchestration.py +309 -30
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/client/schemas/objects.py +11 -8
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/client/schemas/sorting.py +9 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/client/utilities.py +25 -3
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/concurrency/asyncio.py +11 -5
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/concurrency/events.py +3 -3
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/concurrency/services.py +1 -1
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/concurrency/sync.py +9 -5
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deployments/deployments.py +27 -18
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deployments/runner.py +34 -26
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/engine.py +3 -1
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/events/actions.py +2 -1
- prefect-client-2.18.2/src/prefect/events/cli/automations.py +324 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/events/clients.py +53 -20
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/events/filters.py +31 -4
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/events/instrument.py +40 -40
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/events/related.py +2 -1
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/events/schemas/automations.py +52 -7
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/events/schemas/deployment_triggers.py +16 -228
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/events/schemas/events.py +18 -11
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/events/schemas/labelling.py +1 -1
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/events/utilities.py +1 -1
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/events/worker.py +10 -7
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/flows.py +42 -24
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/input/actions.py +9 -9
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/input/run_input.py +51 -37
- prefect-client-2.18.2/src/prefect/new_flow_engine.py +444 -0
- prefect-client-2.18.2/src/prefect/new_task_engine.py +488 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/results.py +3 -2
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/runner/runner.py +3 -2
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +45 -4
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/settings.py +47 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/states.py +25 -19
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/tasks.py +146 -19
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/asyncutils.py +41 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/engine.py +6 -4
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/schema_tools/validation.py +1 -1
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/workers/process.py +2 -1
- {prefect-client-2.18.0 → prefect-client-2.18.2/src/prefect_client.egg-info}/PKG-INFO +1 -1
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect_client.egg-info/SOURCES.txt +3 -1
- prefect-client-2.18.0/src/prefect/_internal/schemas/fields.py +0 -51
- prefect-client-2.18.0/src/prefect/concurrency/common.py +0 -0
- prefect-client-2.18.0/src/prefect/events/cli/automations.py +0 -163
- {prefect-client-2.18.0 → prefect-client-2.18.2}/LICENSE +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/MANIFEST.in +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/README.md +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/requirements-client.txt +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/requirements.txt +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/setup.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/.prefectignore +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/_logging.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/compatibility/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/compatibility/deprecated.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/compatibility/experimental.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/concurrency/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/concurrency/api.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/concurrency/calls.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/concurrency/cancellation.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/concurrency/event_loop.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/concurrency/inspection.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/concurrency/primitives.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/concurrency/services.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/concurrency/threads.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/concurrency/waiters.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/_base_model.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/_compat.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/_flags.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/_types.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/annotations/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/annotations/pendulum.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/schemas.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/utilities/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/utilities/config_dict.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/utilities/field_validator.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/utilities/model_construct.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/utilities/model_copy.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/utilities/model_dump.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/utilities/model_dump_json.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/utilities/model_fields.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/utilities/model_fields_set.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/utilities/model_json_schema.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/utilities/model_rebuild.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/utilities/model_validate.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/utilities/model_validate_json.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/utilities/model_validator.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/utilities/type_adapter.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/v1_schema.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/pytz.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/schemas/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/schemas/bases.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/schemas/serializers.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_internal/schemas/validators.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/applications.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/background.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/concurrency.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/datastructures.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/dependencies/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/dependencies/models.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/dependencies/utils.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/encoders.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/exception_handlers.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/exceptions.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/logger.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/middleware/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/middleware/asyncexitstack.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/middleware/cors.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/middleware/gzip.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/middleware/httpsredirect.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/middleware/trustedhost.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/middleware/wsgi.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/openapi/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/openapi/constants.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/openapi/docs.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/openapi/models.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/openapi/utils.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/param_functions.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/params.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/requests.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/responses.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/routing.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/security/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/security/api_key.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/security/base.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/security/http.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/security/oauth2.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/security/open_id_connect_url.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/security/utils.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/staticfiles.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/templating.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/testclient.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/types.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/utils.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/fastapi/websockets.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/_compat.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/_exception_handler.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/_utils.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/applications.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/authentication.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/background.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/concurrency.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/config.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/convertors.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/datastructures.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/endpoints.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/exceptions.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/formparsers.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/middleware/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/middleware/authentication.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/middleware/base.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/middleware/cors.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/middleware/errors.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/middleware/exceptions.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/middleware/gzip.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/middleware/httpsredirect.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/middleware/sessions.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/middleware/trustedhost.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/middleware/wsgi.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/requests.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/responses.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/routing.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/schemas.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/staticfiles.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/status.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/templating.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/testclient.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/types.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_vendor/starlette/websockets.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/_version.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/agent.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/artifacts.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/blocks/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/blocks/abstract.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/blocks/fields.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/blocks/kubernetes.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/blocks/webhook.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/client/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/client/base.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/client/cloud.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/client/collections.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/client/constants.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/client/schemas/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/client/schemas/actions.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/client/schemas/filters.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/client/schemas/responses.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/client/schemas/schedules.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/client/subscriptions.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/concurrency/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/context.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deployments/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deployments/base.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deployments/schedules.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deployments/steps/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deployments/steps/core.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deployments/steps/pull.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deployments/steps/utility.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deprecated/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deprecated/data_documents.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deprecated/packaging/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deprecated/packaging/base.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deprecated/packaging/docker.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deprecated/packaging/file.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deprecated/packaging/orion.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/deprecated/packaging/serializers.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/events/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/events/cli/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/events/schemas/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/exceptions.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/filesystems.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/flow_runs.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/futures.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/infrastructure/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/infrastructure/base.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/infrastructure/container.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/infrastructure/kubernetes.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/infrastructure/process.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/infrastructure/provisioners/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/infrastructure/provisioners/cloud_run.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/infrastructure/provisioners/container_instance.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/infrastructure/provisioners/ecs.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/infrastructure/provisioners/modal.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/input/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/logging/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/logging/configuration.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/logging/filters.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/logging/formatters.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/logging/handlers.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/logging/highlighters.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/logging/loggers.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/logging/logging.yml +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/manifests.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/plugins.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/profiles.toml +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/py.typed +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/pydantic/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/pydantic/main.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/runner/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/runner/server.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/runner/storage.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/runner/submit.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/runner/utils.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/runtime/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/runtime/deployment.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/runtime/flow_run.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/runtime/task_run.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/serializers.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/software/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/software/base.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/software/conda.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/software/pip.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/software/python.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/task_engine.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/task_runners.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/task_server.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/types/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/annotations.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/callables.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/collections.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/compat.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/context.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/dispatch.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/dockerutils.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/filesystem.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/hashing.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/importtools.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/math.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/names.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/processutils.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/pydantic.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/render_swagger.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/schema_tools/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/schema_tools/hydration.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/services.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/slugify.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/templating.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/text.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/utilities/visualization.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/variables.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/workers/__init__.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/workers/base.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/workers/block.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/workers/server.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect/workers/utilities.py +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect_client.egg-info/dependency_links.txt +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect_client.egg-info/requires.txt +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/src/prefect_client.egg-info/top_level.txt +0 -0
- {prefect-client-2.18.0 → prefect-client-2.18.2}/versioneer.py +0 -0
@@ -14,7 +14,7 @@ mkdocstrings-python
|
|
14
14
|
mike
|
15
15
|
mock; python_version < '3.8'
|
16
16
|
moto >= 5
|
17
|
-
mypy
|
17
|
+
mypy >= 1.9.0
|
18
18
|
numpy
|
19
19
|
pillow
|
20
20
|
pre-commit
|
@@ -35,3 +35,7 @@ vermin
|
|
35
35
|
virtualenv
|
36
36
|
watchfiles
|
37
37
|
respx
|
38
|
+
|
39
|
+
# type stubs
|
40
|
+
types-cachetools
|
41
|
+
types-PyYAML
|
@@ -54,15 +54,13 @@ filterwarnings =
|
|
54
54
|
ignore::pluggy.PluggyTeardownRaisedWarning
|
55
55
|
|
56
56
|
[mypy]
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
plugins =
|
58
|
+
pydantic.mypy
|
59
|
+
ignore_missing_imports = True
|
60
|
+
follow_imports = skip
|
60
61
|
|
61
|
-
[mypy-
|
62
|
-
|
63
|
-
|
64
|
-
[mypy-prefect.tasks]
|
65
|
-
ignore_errors = True
|
62
|
+
[mypy-ruamel]
|
63
|
+
ignore_missing_imports = True
|
66
64
|
|
67
65
|
[versioneer]
|
68
66
|
vcs = git
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import datetime
|
2
|
+
from typing import Optional
|
3
|
+
from uuid import UUID
|
4
|
+
|
5
|
+
import pendulum
|
6
|
+
from typing_extensions import TypeAlias
|
7
|
+
|
8
|
+
from prefect._internal.pydantic import HAS_PYDANTIC_V2
|
9
|
+
|
10
|
+
if HAS_PYDANTIC_V2:
|
11
|
+
from pydantic.v1 import BaseModel, Field
|
12
|
+
else:
|
13
|
+
from pydantic import BaseModel, Field
|
14
|
+
|
15
|
+
|
16
|
+
# Rather than subclassing pendulum.DateTime to add our pydantic-specific validation,
|
17
|
+
# which will lead to a lot of funky typing issues, we'll just monkeypatch the pydantic
|
18
|
+
# validators onto the class. Retaining this type alias means that we can still use it
|
19
|
+
# as we have been in class definitions, also guaranteeing that we'll be applying these
|
20
|
+
# validators by importing this module.
|
21
|
+
|
22
|
+
DateTimeTZ: TypeAlias = pendulum.DateTime
|
23
|
+
|
24
|
+
|
25
|
+
def _datetime_patched_classmethod(function):
|
26
|
+
if hasattr(DateTimeTZ, function.__name__):
|
27
|
+
return function
|
28
|
+
setattr(DateTimeTZ, function.__name__, classmethod(function))
|
29
|
+
return function
|
30
|
+
|
31
|
+
|
32
|
+
@_datetime_patched_classmethod
|
33
|
+
def __get_validators__(cls):
|
34
|
+
yield getattr(cls, "validate")
|
35
|
+
|
36
|
+
|
37
|
+
@_datetime_patched_classmethod
|
38
|
+
def validate(cls, v) -> pendulum.DateTime:
|
39
|
+
if isinstance(v, str):
|
40
|
+
parsed = pendulum.parse(v)
|
41
|
+
assert isinstance(parsed, pendulum.DateTime)
|
42
|
+
return parsed
|
43
|
+
elif isinstance(v, datetime.datetime):
|
44
|
+
return pendulum.instance(v)
|
45
|
+
else:
|
46
|
+
raise ValueError("Unrecognized datetime.")
|
47
|
+
|
48
|
+
|
49
|
+
class CreatedBy(BaseModel):
|
50
|
+
id: Optional[UUID] = Field(
|
51
|
+
default=None, description="The id of the creator of the object."
|
52
|
+
)
|
53
|
+
type: Optional[str] = Field(
|
54
|
+
default=None, description="The type of the creator of the object."
|
55
|
+
)
|
56
|
+
display_value: Optional[str] = Field(
|
57
|
+
default=None, description="The display value for the creator."
|
58
|
+
)
|
59
|
+
|
60
|
+
|
61
|
+
class UpdatedBy(BaseModel):
|
62
|
+
id: Optional[UUID] = Field(
|
63
|
+
default=None, description="The id of the updater of the object."
|
64
|
+
)
|
65
|
+
type: Optional[str] = Field(
|
66
|
+
default=None, description="The type of the updater of the object."
|
67
|
+
)
|
68
|
+
display_value: Optional[str] = Field(
|
69
|
+
default=None, description="The display value for the updater."
|
70
|
+
)
|
@@ -0,0 +1,162 @@
|
|
1
|
+
from typing import Optional
|
2
|
+
from uuid import UUID
|
3
|
+
|
4
|
+
from pydantic import Field
|
5
|
+
from typing_extensions import Self
|
6
|
+
|
7
|
+
from prefect.client.utilities import get_or_create_client
|
8
|
+
from prefect.events.schemas.automations import (
|
9
|
+
AutomationCore,
|
10
|
+
CompositeTrigger,
|
11
|
+
CompoundTrigger,
|
12
|
+
EventTrigger,
|
13
|
+
MetricTrigger,
|
14
|
+
MetricTriggerOperator,
|
15
|
+
MetricTriggerQuery,
|
16
|
+
Posture,
|
17
|
+
PrefectMetric,
|
18
|
+
ResourceSpecification,
|
19
|
+
ResourceTrigger,
|
20
|
+
SequenceTrigger,
|
21
|
+
Trigger,
|
22
|
+
)
|
23
|
+
from prefect.exceptions import PrefectHTTPStatusError
|
24
|
+
from prefect.utilities.asyncutils import sync_compatible
|
25
|
+
|
26
|
+
__all__ = [
|
27
|
+
"AutomationCore",
|
28
|
+
"EventTrigger",
|
29
|
+
"ResourceTrigger",
|
30
|
+
"Posture",
|
31
|
+
"Trigger",
|
32
|
+
"ResourceSpecification",
|
33
|
+
"MetricTriggerOperator",
|
34
|
+
"MetricTrigger",
|
35
|
+
"PrefectMetric",
|
36
|
+
"CompositeTrigger",
|
37
|
+
"SequenceTrigger",
|
38
|
+
"CompoundTrigger",
|
39
|
+
"MetricTriggerQuery",
|
40
|
+
]
|
41
|
+
|
42
|
+
|
43
|
+
class Automation(AutomationCore):
|
44
|
+
id: Optional[UUID] = Field(default=None, description="The ID of this automation")
|
45
|
+
|
46
|
+
@sync_compatible
|
47
|
+
async def create(self: Self) -> Self:
|
48
|
+
"""
|
49
|
+
Create a new automation.
|
50
|
+
|
51
|
+
auto_to_create = Automation(
|
52
|
+
name="woodchonk",
|
53
|
+
trigger=EventTrigger(
|
54
|
+
expect={"animal.walked"},
|
55
|
+
match={
|
56
|
+
"genus": "Marmota",
|
57
|
+
"species": "monax",
|
58
|
+
},
|
59
|
+
posture="Reactive",
|
60
|
+
threshold=3,
|
61
|
+
within=timedelta(seconds=10),
|
62
|
+
),
|
63
|
+
actions=[CancelFlowRun()]
|
64
|
+
)
|
65
|
+
created_automation = auto_to_create.create()
|
66
|
+
"""
|
67
|
+
client, _ = get_or_create_client()
|
68
|
+
automation = AutomationCore(**self.dict(exclude={"id"}))
|
69
|
+
self.id = await client.create_automation(automation=automation)
|
70
|
+
return self
|
71
|
+
|
72
|
+
@sync_compatible
|
73
|
+
async def update(self: Self):
|
74
|
+
"""
|
75
|
+
Updates an existing automation.
|
76
|
+
auto = Automation.read(id=123)
|
77
|
+
auto.name = "new name"
|
78
|
+
auto.update()
|
79
|
+
"""
|
80
|
+
|
81
|
+
client, _ = get_or_create_client()
|
82
|
+
automation = AutomationCore(**self.dict(exclude={"id", "owner_resource"}))
|
83
|
+
await client.update_automation(automation_id=self.id, automation=automation)
|
84
|
+
|
85
|
+
@classmethod
|
86
|
+
@sync_compatible
|
87
|
+
async def read(
|
88
|
+
cls: Self, id: Optional[UUID] = None, name: Optional[str] = None
|
89
|
+
) -> Self:
|
90
|
+
"""
|
91
|
+
Read an automation by ID or name.
|
92
|
+
automation = Automation.read(name="woodchonk")
|
93
|
+
|
94
|
+
or
|
95
|
+
|
96
|
+
automation = Automation.read(id=UUID("b3514963-02b1-47a5-93d1-6eeb131041cb"))
|
97
|
+
"""
|
98
|
+
if id and name:
|
99
|
+
raise ValueError("Only one of id or name can be provided")
|
100
|
+
if not id and not name:
|
101
|
+
raise ValueError("One of id or name must be provided")
|
102
|
+
client, _ = get_or_create_client()
|
103
|
+
if id:
|
104
|
+
try:
|
105
|
+
automation = await client.read_automation(automation_id=id)
|
106
|
+
except PrefectHTTPStatusError as exc:
|
107
|
+
if exc.response.status_code == 404:
|
108
|
+
raise ValueError(f"Automation with ID {id!r} not found")
|
109
|
+
return Automation(**automation.dict())
|
110
|
+
else:
|
111
|
+
automation = await client.read_automations_by_name(name=name)
|
112
|
+
if len(automation) > 0:
|
113
|
+
return Automation(**automation[0].dict()) if automation else None
|
114
|
+
else:
|
115
|
+
raise ValueError(f"Automation with name {name!r} not found")
|
116
|
+
|
117
|
+
@sync_compatible
|
118
|
+
async def delete(self: Self) -> bool:
|
119
|
+
"""
|
120
|
+
auto = Automation.read(id = 123)
|
121
|
+
auto.delete()
|
122
|
+
"""
|
123
|
+
try:
|
124
|
+
client, _ = get_or_create_client()
|
125
|
+
await client.delete_automation(self.id)
|
126
|
+
return True
|
127
|
+
except PrefectHTTPStatusError as exc:
|
128
|
+
if exc.response.status_code == 404:
|
129
|
+
return False
|
130
|
+
raise
|
131
|
+
|
132
|
+
@sync_compatible
|
133
|
+
async def disable(self: Self) -> bool:
|
134
|
+
"""
|
135
|
+
Disable an automation.
|
136
|
+
auto = Automation.read(id = 123)
|
137
|
+
auto.disable()
|
138
|
+
"""
|
139
|
+
try:
|
140
|
+
client, _ = get_or_create_client()
|
141
|
+
await client.pause_automation(self.id)
|
142
|
+
return True
|
143
|
+
except PrefectHTTPStatusError as exc:
|
144
|
+
if exc.response.status_code == 404:
|
145
|
+
return False
|
146
|
+
raise
|
147
|
+
|
148
|
+
@sync_compatible
|
149
|
+
async def enable(self: Self) -> bool:
|
150
|
+
"""
|
151
|
+
Enable an automation.
|
152
|
+
auto = Automation.read(id = 123)
|
153
|
+
auto.enable()
|
154
|
+
"""
|
155
|
+
try:
|
156
|
+
client, _ = get_or_create_client()
|
157
|
+
await client.resume_automation("asd")
|
158
|
+
return True
|
159
|
+
except PrefectHTTPStatusError as exc:
|
160
|
+
if exc.response.status_code == 404:
|
161
|
+
return False
|
162
|
+
raise
|
@@ -62,7 +62,7 @@ class AbstractAppriseNotificationBlock(NotificationBlock, ABC):
|
|
62
62
|
self._start_apprise_client(self.url)
|
63
63
|
|
64
64
|
@sync_compatible
|
65
|
-
@instrument_instance_method_call
|
65
|
+
@instrument_instance_method_call
|
66
66
|
async def notify(
|
67
67
|
self,
|
68
68
|
body: str,
|
@@ -717,7 +717,7 @@ class CustomWebhookNotificationBlock(NotificationBlock):
|
|
717
717
|
raise KeyError(f"{name}/{placeholder}")
|
718
718
|
|
719
719
|
@sync_compatible
|
720
|
-
@instrument_instance_method_call
|
720
|
+
@instrument_instance_method_call
|
721
721
|
async def notify(self, body: str, subject: Optional[str] = None):
|
722
722
|
import httpx
|
723
723
|
|
@@ -1,7 +1,5 @@
|
|
1
1
|
from typing import Any
|
2
2
|
|
3
|
-
import pendulum
|
4
|
-
|
5
3
|
from prefect._internal.pydantic import HAS_PYDANTIC_V2
|
6
4
|
|
7
5
|
if HAS_PYDANTIC_V2:
|
@@ -9,6 +7,7 @@ if HAS_PYDANTIC_V2:
|
|
9
7
|
else:
|
10
8
|
from pydantic import Field, SecretStr
|
11
9
|
|
10
|
+
from prefect._internal.schemas.fields import DateTimeTZ
|
12
11
|
from prefect.blocks.core import Block
|
13
12
|
|
14
13
|
|
@@ -76,7 +75,7 @@ class DateTime(Block):
|
|
76
75
|
_logo_url = "https://cdn.sanity.io/images/3ugk85nk/production/8b3da9a6621e92108b8e6a75b82e15374e170ff7-48x48.png"
|
77
76
|
_documentation_url = "https://docs.prefect.io/api-ref/prefect/blocks/system/#prefect.blocks.system.DateTime"
|
78
77
|
|
79
|
-
value:
|
78
|
+
value: DateTimeTZ = Field(
|
80
79
|
default=...,
|
81
80
|
description="An ISO 8601-compatible datetime value.",
|
82
81
|
)
|