From 192950db994f666556f41767b532b99f7fb58d2f Mon Sep 17 00:00:00 2001 From: stepskop Date: Mon, 21 Jul 2025 18:01:28 +0200 Subject: [PATCH 1/4] chore: add user_is_paying annotation to the configuration --- src/apify/_configuration.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/apify/_configuration.py b/src/apify/_configuration.py index 4e12304c..a1355031 100644 --- a/src/apify/_configuration.py +++ b/src/apify/_configuration.py @@ -334,6 +334,14 @@ class Configuration(CrawleeConfiguration): ), ] = None + user_is_paying: Annotated[ + str | None, + Field( + alias='apify_user_is_paying', + description='If set to "1", the user calling the Actor is paying user', + ), + ] = None + web_server_port: Annotated[ int, Field( From 441a7900487352428432c00b6677ceabaf4e1310 Mon Sep 17 00:00:00 2001 From: stepskop Date: Tue, 22 Jul 2025 12:02:09 +0200 Subject: [PATCH 2/4] chore: parse the field to bool --- src/apify/_configuration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apify/_configuration.py b/src/apify/_configuration.py index a1355031..b842f0f8 100644 --- a/src/apify/_configuration.py +++ b/src/apify/_configuration.py @@ -335,12 +335,12 @@ class Configuration(CrawleeConfiguration): ] = None user_is_paying: Annotated[ - str | None, + bool, Field( alias='apify_user_is_paying', - description='If set to "1", the user calling the Actor is paying user', + description='True if the user calling the Actor is paying user', ), - ] = None + ] = False web_server_port: Annotated[ int, From 817dc8554c67017789a25a3fee65cf87ae688292 Mon Sep 17 00:00:00 2001 From: stepskop Date: Tue, 22 Jul 2025 13:52:57 +0200 Subject: [PATCH 3/4] fix: handle empty variable --- src/apify/_configuration.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/apify/_configuration.py b/src/apify/_configuration.py index b842f0f8..7a82286a 100644 --- a/src/apify/_configuration.py +++ b/src/apify/_configuration.py @@ -340,6 +340,7 @@ class Configuration(CrawleeConfiguration): alias='apify_user_is_paying', description='True if the user calling the Actor is paying user', ), + BeforeValidator(lambda val: False if val == '' else val), ] = False web_server_port: Annotated[ From 5e498c4fd68ffb933bef575a029120e37326c9a4 Mon Sep 17 00:00:00 2001 From: stepskop Date: Fri, 1 Aug 2025 10:06:54 +0200 Subject: [PATCH 4/4] chore: update deps --- uv.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/uv.lock b/uv.lock index 92245630..2a0d2880 100644 --- a/uv.lock +++ b/uv.lock @@ -28,7 +28,7 @@ wheels = [ [[package]] name = "apify" -version = "2.7.1" +version = "2.7.3" source = { editable = "." } dependencies = [ { name = "apify-client" }, @@ -124,11 +124,11 @@ wheels = [ [[package]] name = "apify-shared" -version = "1.4.1" +version = "1.4.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b2/a6/c8e2fa0b3bdc479d3ecde778e2381af199f910cf7c8baa3c207bcfe26e47/apify_shared-1.4.1.tar.gz", hash = "sha256:16e617c840fd27bf38d980f079c0b867c7378f68c7006b3d5a7d530d43930507", size = 13871, upload-time = "2025-04-28T12:20:01.113Z" } +sdist = { url = "https://files.pythonhosted.org/packages/50/90/8c124864a372693a86c26efc38de27440a03bc69a18055399041dd18fa24/apify_shared-1.4.2.tar.gz", hash = "sha256:7190f2b7557b50b40acb32a1fcc783ea8a0fa58bf3cf33fc03e23de49f318b45", size = 13889, upload-time = "2025-08-01T07:38:54.625Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/1d/f3/3446c8a7986fdc087024d4e174e4b3f587097a9b28f6f8e8c788199225b2/apify_shared-1.4.1-py3-none-any.whl", hash = "sha256:abac5712b6e8eb96693204cbb2702905e1971d9084b1716e7337852b5005290e", size = 12706, upload-time = "2025-04-28T12:19:59.792Z" }, + { url = "https://files.pythonhosted.org/packages/c2/d6/e3864ffe8886713aa5306d38b0e90237085d4951699a4be39adbcc4194e5/apify_shared-1.4.2-py3-none-any.whl", hash = "sha256:1958b843c4e16af0804b3f6ba886264091b54c15bf524606fafb55d20ed08fff", size = 12725, upload-time = "2025-08-01T07:38:53.556Z" }, ] [[package]]