René's URL Explorer Experiment


Title: feat: Accept Pydantic models as alternatives to dicts in resource client methods by vdusek · Pull Request #663 · apify/apify-client-python · GitHub

Open Graph Title: feat: Accept Pydantic models as alternatives to dicts in resource client methods by vdusek · Pull Request #663 · apify/apify-client-python

X Title: feat: Accept Pydantic models as alternatives to dicts in resource client methods by vdusek · Pull Request #663 · apify/apify-client-python

Description: Changes summary Accept dict | PydanticModel union types in resource client methods that previously only accepted dict, enabling type-safe usage alongside plain dict input. Dicts are validated through Pydantic internally, catching schema errors earlier than the API would. Replace the dict-based encode_webhook_list_to_base64 utility with a structured WebhookRepresentationList model that handles validation and base64 encoding. Add RequestInput and RequestDeleteInput models in _types.py for RQ operations, matching the actual API schema requirements. Issues Closes: #421 Motivation Improve typing on the input side of resource client methods. We don't want to accept only Pydantic models, which would require users to import additional classes. Instead, methods now accept both dict and the corresponding Pydantic model. This way, users don't have to import anything extra, but can optionally use the model types for type-safe usage and to discover the expected dict shape. Next steps Once we fully update the OpenAPI spec (apify/apify-docs#2286), we can remove the manually created models in _types.py and replace them with the generated ones. Test plan CI passes

Open Graph Description: Changes summary Accept dict | PydanticModel union types in resource client methods that previously only accepted dict, enabling type-safe usage alongside plain dict input. Dicts are validated thro...

X Description: Changes summary Accept dict | PydanticModel union types in resource client methods that previously only accepted dict, enabling type-safe usage alongside plain dict input. Dicts are validated thro...

Opengraph URL: https://github.com/apify/apify-client-python/pull/663

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:c56245da-a5e3-8377-808c-3c581ba5edac
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id927A:4C4E6:F27C3:14B838:6B00634C
html-safe-nonce92c5df7de3a7d331485a62ae0289a6b7a3352cd3305b9154ce62c62e377540c7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjdBOjRDNEU2OkYyN0MzOjE0QjgzODo2QjAwNjM0QyIsInZpc2l0b3JfaWQiOiIxNzkwOTUwNzQzNzQyNjM2ODc2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac86ec6d4132df1e9426f747754be05e1d08bd91aa7d3c0fa1a278a71997698632
hovercard-subject-tagpull_request:3364087203
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/apify/apify-client-python/pull/663/files
twitter:imagehttps://avatars.githubusercontent.com/u/25082181?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/25082181?s=400&v=4
og:image:altChanges summary Accept dict | PydanticModel union types in resource client methods that previously only accepted dict, enabling type-safe usage alongside plain dict input. Dicts are validated thro...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None25854482a1773a7c1ebb8be3d2bc1c6e61d82d78126be63b5044474a86d44d9e
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/apify/apify-client-python git https://github.com/apify/apify-client-python.git
octolytics-dimension-user_id24586296
octolytics-dimension-user_loginapify
octolytics-dimension-repository_id164647835
octolytics-dimension-repository_nwoapify/apify-client-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id164647835
octolytics-dimension-repository_network_root_nwoapify/apify-client-python
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee4f5c239e31f1f680e6bbc419ff92d774da616ec
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/apify/apify-client-python/pull/663/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapify%2Fapify-client-python%2Fpull%2F663%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapify%2Fapify-client-python%2Fpull%2F663%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=apify%2Fapify-client-python
Reloadhttps://github.com/apify/apify-client-python/pull/663/files
Reloadhttps://github.com/apify/apify-client-python/pull/663/files
Reloadhttps://github.com/apify/apify-client-python/pull/663/files
apifyhttps://github.com/apify
apify-client-pythonhttps://github.com/apify/apify-client-python
Codehttps://github.com/apify/apify-client-python
Issues12 (12)https://github.com/apify/apify-client-python/issues
Pull requests2 (2)https://github.com/apify/apify-client-python/pulls
Discussionshttps://github.com/apify/apify-client-python/discussions
Actionshttps://github.com/apify/apify-client-python/actions
Security and qualityhttps://github.com/apify/apify-client-python/security
Insightshttps://github.com/apify/apify-client-python/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fapify%2Fapify-client-python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fapify%2Fapify-client-python%2Fissues%2Fnew%2Fchoose
vdusekhttps://github.com/vdusek
masterhttps://github.com/apify/apify-client-python/tree/master
feat/union-dict-model-typeshttps://github.com/apify/apify-client-python/tree/feat/union-dict-model-types
Conversation 12 https://github.com/apify/apify-client-python/pull/663
Commits 3 https://github.com/apify/apify-client-python/pull/663/commits
Checks 26 https://github.com/apify/apify-client-python/pull/663/checks
Files changed https://github.com/apify/apify-client-python/pull/663/files
Please reload this pagehttps://github.com/apify/apify-client-python/pull/663/files
feat: Accept Pydantic models as alternatives to dicts in resource client methods https://github.com/apify/apify-client-python/pull/663/files#top
Show all changes 3 commits https://github.com/apify/apify-client-python/pull/663/files
0d584bc Accept Pydantic models as alternatives to dicts in resource client me… vdusek Mar 9, 2026 https://github.com/apify/apify-client-python/pull/663/commits/0d584bcce6ff3964eb8103b5af8696f7583c8d9f
5c00f0e Address feedback vdusek Mar 10, 2026 https://github.com/apify/apify-client-python/pull/663/commits/5c00f0e7cecb6b2d19f5ec548c42d03113f2292f
c086dd0 Merge remote-tracking branch 'origin/master' into feat/union-dict-mod… vdusek Mar 11, 2026 https://github.com/apify/apify-client-python/pull/663/commits/c086dd0d21ab8c43857a862e6c9967e628dc0a80
Clear filters https://github.com/apify/apify-client-python/pull/663/files
Please reload this pagehttps://github.com/apify/apify-client-python/pull/663/files
Please reload this pagehttps://github.com/apify/apify-client-python/pull/663/files
actor.py https://github.com/apify/apify-client-python/pull/663/files#diff-dff82028df4338ac7118fe9cff05bec1aeb84121605f80f5627a366709ba97d2
request_queue.py https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
run.py https://github.com/apify/apify-client-python/pull/663/files#diff-8b232f47b07e5ffce58ec2444c81739210652139ef3cc33710f4adc063c73365
task.py https://github.com/apify/apify-client-python/pull/663/files#diff-c4bd8e0ab2c451d44165100c6cf857c447ad975fe049c3b72783b449b82a449d
task_collection.py https://github.com/apify/apify-client-python/pull/663/files#diff-82c15e8df6b1413a7a659963b11501abe645c91a69e39c6cd4aa891523a8dc4f
_types.py https://github.com/apify/apify-client-python/pull/663/files#diff-21fd1426ea79955e1188ea323570c30c4bac305fd74caff1f0a6793d77e2cdb7
_utils.py https://github.com/apify/apify-client-python/pull/663/files#diff-964cbb4e9324d1facddad74d252c78bf87caf3214e61cb0fb9a388da5c42ccea
test_utils.py https://github.com/apify/apify-client-python/pull/663/files#diff-a28b281ee0902c932527e269c585ac109bdd98aa5ceebe05ca97a10a5a432651
src/apify_client/_resource_clients/actor.pyhttps://github.com/apify/apify-client-python/pull/663/files#diff-dff82028df4338ac7118fe9cff05bec1aeb84121605f80f5627a366709ba97d2
View file https://github.com/apify/apify-client-python/blob/c086dd0d21ab8c43857a862e6c9967e628dc0a80/src/apify_client/_resource_clients/actor.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apify/apify-client-python/pull/663/{{ revealButtonHref }}
https://github.com/apify/apify-client-python/pull/663/files#diff-dff82028df4338ac7118fe9cff05bec1aeb84121605f80f5627a366709ba97d2
https://github.com/apify/apify-client-python/pull/663/files#diff-dff82028df4338ac7118fe9cff05bec1aeb84121605f80f5627a366709ba97d2
https://github.com/apify/apify-client-python/pull/663/files#diff-dff82028df4338ac7118fe9cff05bec1aeb84121605f80f5627a366709ba97d2
https://github.com/apify/apify-client-python/pull/663/files#diff-dff82028df4338ac7118fe9cff05bec1aeb84121605f80f5627a366709ba97d2
https://github.com/apify/apify-client-python/pull/663/files#diff-dff82028df4338ac7118fe9cff05bec1aeb84121605f80f5627a366709ba97d2
https://github.com/apify/apify-client-python/pull/663/files#diff-dff82028df4338ac7118fe9cff05bec1aeb84121605f80f5627a366709ba97d2
https://github.com/apify/apify-client-python/pull/663/files#diff-dff82028df4338ac7118fe9cff05bec1aeb84121605f80f5627a366709ba97d2
https://github.com/apify/apify-client-python/pull/663/files#diff-dff82028df4338ac7118fe9cff05bec1aeb84121605f80f5627a366709ba97d2
https://github.com/apify/apify-client-python/pull/663/files#diff-dff82028df4338ac7118fe9cff05bec1aeb84121605f80f5627a366709ba97d2
https://github.com/apify/apify-client-python/pull/663/files#diff-dff82028df4338ac7118fe9cff05bec1aeb84121605f80f5627a366709ba97d2
https://github.com/apify/apify-client-python/pull/663/files#diff-dff82028df4338ac7118fe9cff05bec1aeb84121605f80f5627a366709ba97d2
https://github.com/apify/apify-client-python/pull/663/files#diff-dff82028df4338ac7118fe9cff05bec1aeb84121605f80f5627a366709ba97d2
src/apify_client/_resource_clients/request_queue.pyhttps://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
View file https://github.com/apify/apify-client-python/blob/c086dd0d21ab8c43857a862e6c9967e628dc0a80/src/apify_client/_resource_clients/request_queue.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apify/apify-client-python/pull/663/{{ revealButtonHref }}
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
https://github.com/apify/apify-client-python/pull/663/files#diff-8c1afeba7551a3409fe77f612cb7fe037b981f961fef8c542fbc2d3bf2f999b5
src/apify_client/_resource_clients/run.pyhttps://github.com/apify/apify-client-python/pull/663/files#diff-8b232f47b07e5ffce58ec2444c81739210652139ef3cc33710f4adc063c73365
View file https://github.com/apify/apify-client-python/blob/c086dd0d21ab8c43857a862e6c9967e628dc0a80/src/apify_client/_resource_clients/run.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apify/apify-client-python/pull/663/{{ revealButtonHref }}
https://github.com/apify/apify-client-python/pull/663/files#diff-8b232f47b07e5ffce58ec2444c81739210652139ef3cc33710f4adc063c73365
https://github.com/apify/apify-client-python/pull/663/files#diff-8b232f47b07e5ffce58ec2444c81739210652139ef3cc33710f4adc063c73365
Please reload this pagehttps://github.com/apify/apify-client-python/pull/663/files
Please reload this pagehttps://github.com/apify/apify-client-python/pull/663/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.