René's URL Explorer Experiment


Title: Consider accepting both snake_case and camelCase values for dicts and Literals · Issue #756 · apify/apify-client-python · GitHub

Open Graph Title: Consider accepting both snake_case and camelCase values for dicts and Literals · Issue #756 · apify/apify-client-python

X Title: Consider accepting both snake_case and camelCase values for dicts and Literals · Issue #756 · apify/apify-client-python

Description: Context Spun out of a review discussion on #738: #738 (comment) I think there is a case for accepting camelCase here instead - it is exactly what the API accepts. On the other hand, snake_case fits in better with the rest of the Python c...

Open Graph Description: Context Spun out of a review discussion on #738: #738 (comment) I think there is a case for accepting camelCase here instead - it is exactly what the API accepts. On the other hand, snake_case fits...

X Description: Context Spun out of a review discussion on #738: #738 (comment) I think there is a case for accepting camelCase here instead - it is exactly what the API accepts. On the other hand, snake_case fits...

Opengraph URL: https://github.com/apify/apify-client-python/issues/756

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Consider accepting both snake_case and camelCase values for dicts and Literals","articleBody":"## Context\n\nSpun out of a review discussion on #738: https://github.com/apify/apify-client-python/pull/738#discussion_r3111857207\n\n> I think there is a case for accepting camelCase here instead - it is exactly what the API accepts. On the other hand, snake_case fits in better with the rest of the Python code and works better for the \"I just don't want to look up what model I need to import\" use case for TypedDicts.\n\nThe same tension already exists today for `Literal` values used in resource-client methods, e.g.:\n\n```python\nsort_by: Literal['created_at', 'last_run_started_at'] | None = 'created_at'\n```\n\nThe Apify API expects these as camelCase (`createdAt`, `lastRunStartedAt`), while the Python client exposes them in snake_case to match Python conventions. The same question now arises for the newly generated input-side `TypedDict`s from #738 (field names in dicts passed to client methods).\n\n## Proposal\n\nConsider — and, if agreed, implement — accepting **both** `snake_case` and `camelCase` values in:\n\n1. **`TypedDict` inputs** introduced in #738 (`_typeddicts_generated.py`, `_typeddicts.py`) — allow users to pass either naming style as keys.\n2. **`Literal` arguments** already present across resource clients (e.g. `sort_by`, pricing-model literals, webhook event-type literals, etc.) — accept both forms.\n\n### Trade-offs to weigh\n\n- **Pro snake_case only:** consistent with Pydantic models and the rest of the Python code; idiomatic for Python users.\n- **Pro camelCase only:** matches the API 1:1 — users who already know the API don't need a translation table, which is especially valuable for the \"I don't want to import the Pydantic model, just pass a dict\" use case.\n- **Pro accepting both:** maximum ergonomics, no wrong answer for the user; cost is implementation complexity (normalization layer) and documentation/typing clarity (both forms must be reflected in the type hints so the type checker accepts them).\n\n## Scope\n\n- Decide on the policy (one style only vs. both accepted).\n- If accepting both: define normalization boundary (input translation to API payload), update generation scripts (`scripts/postprocess_generated_models.py`) and the hand-written literals in resource clients, and ensure type checkers (`ty`) see both forms.\n- Update docs/examples accordingly.\n\ncc @janbuchar","author":{"url":"https://github.com/vdusek","@type":"Person","name":"vdusek"},"datePublished":"2026-04-23T09:57:46Z","url":"https://github.com/apify/apify-client-python/issues/756"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b942d07a-3bf7-d12b-34ee-5659db6811b3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id818C:2A4B31:9A74AE:CFA4FD:6B0046C6
html-safe-noncea554b1f72658f6f635f850e0cc1ef47c9d3f359c7a4ee18f5e697e874ac81434
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MThDOjJBNEIzMTo5QTc0QUU6Q0ZBNEZEOjZCMDA0NkM2IiwidmlzaXRvcl9pZCI6IjM3MjIyMDA5OTgwMjcxMTc1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac8f1ac5ebc9dc394cdf0a31ff9c5d8457aefd448696fc82dc27249921a5afecc4
hovercard-subject-tagissue:4315107234
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/apify/apify-client-python/756/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c5077cfe496dcbee17f815b056f5ec61ab62c0a7ce220a1fdc8b1f1089d116cb/apify/apify-client-python/issues/756
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c5077cfe496dcbee17f815b056f5ec61ab62c0a7ce220a1fdc8b1f1089d116cb/apify/apify-client-python/issues/756
og:image:altContext Spun out of a review discussion on #738: #738 (comment) I think there is a case for accepting camelCase here instead - it is exactly what the API accepts. On the other hand, snake_case fits...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevdusek
hostnamegithub.com
expected-hostnamegithub.com
None7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef3f3a43ca095cdea3abbb394112e971f9fdb94fa
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/apify/apify-client-python/issues/756#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapify%2Fapify-client-python%2Fissues%2F756
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%2Fissues%2F756
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=apify%2Fapify-client-python
Reloadhttps://github.com/apify/apify-client-python/issues/756
Reloadhttps://github.com/apify/apify-client-python/issues/756
Reloadhttps://github.com/apify/apify-client-python/issues/756
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
https://github.com/apify/apify-client-python
New issuehttps://github.com/login?return_to=https://github.com/apify/apify-client-python/issues/756
New issuehttps://github.com/login?return_to=https://github.com/apify/apify-client-python/issues/756
#793https://github.com/apify/apify-client-python/pull/793
Consider accepting both snake_case and camelCase values for dicts and Literalshttps://github.com/apify/apify-client-python/issues/756#top
#793https://github.com/apify/apify-client-python/pull/793
https://github.com/vdusek
t-toolingIssues with this label are in the ownership of the tooling team.https://github.com/apify/apify-client-python/issues?q=state%3Aopen%20label%3A%22t-tooling%22
3.0https://github.com/apify/apify-client-python/milestone/560
https://github.com/vdusek
vdusekhttps://github.com/vdusek
on Apr 23, 2026https://github.com/apify/apify-client-python/issues/756#issue-4315107234
#738https://github.com/apify/apify-client-python/pull/738
#738 (comment)https://github.com/apify/apify-client-python/pull/738#discussion_r3111857207
#738https://github.com/apify/apify-client-python/pull/738
feat: generate TypedDict types for input-side models #738https://github.com/apify/apify-client-python/pull/738
@janbucharhttps://github.com/janbuchar
github-actionshttps://github.com/apps/github-actions
t-toolingIssues with this label are in the ownership of the tooling team.https://github.com/apify/apify-client-python/issues?q=state%3Aopen%20label%3A%22t-tooling%22
on Apr 23, 2026https://github.com/apify/apify-client-python/issues/756#event-24790813416
vdusekhttps://github.com/vdusek
on Apr 23, 2026https://github.com/apify/apify-client-python/issues/756#event-24795752249
vdusekhttps://github.com/vdusek
3.0https://github.com/apify/apify-client-python/milestone/560
on Apr 23, 2026https://github.com/apify/apify-client-python/issues/756#event-24795754921
https://github.com/vdusek
vdusekhttps://github.com/vdusek
on May 11, 2026https://github.com/apify/apify-client-python/issues/756#issuecomment-4419544611
@janbucharhttps://github.com/janbuchar
https://github.com/janbuchar
janbucharhttps://github.com/janbuchar
on May 11, 2026https://github.com/apify/apify-client-python/issues/756#issuecomment-4421695229
https://github.com/vdusek
vdusekhttps://github.com/vdusek
on May 14, 2026https://github.com/apify/apify-client-python/issues/756#issuecomment-4450222664
vdusekhttps://github.com/vdusek
on May 18, 2026https://github.com/apify/apify-client-python/issues/756#event-25657213472
feat: accept camelCase keys in input TypedDictshttps://github.com/apify/apify-client-python/commit/5914254ad1695d6bdad845f3a08464673eae2394
https://docs.github.com/articles/closing-issues-via-commit-messages
5914254https://github.com/apify/apify-client-python/commit/5914254ad1695d6bdad845f3a08464673eae2394
feat: accept camelCase keys in input TypedDicts (#793)https://github.com/apify/apify-client-python/commit/7a579bf2083e93092cfa5ba411c1c38d5cba2085
#793https://github.com/apify/apify-client-python/pull/793
https://docs.github.com/articles/closing-issues-via-commit-messages
7a579bfhttps://github.com/apify/apify-client-python/commit/7a579bf2083e93092cfa5ba411c1c38d5cba2085
vdusekhttps://github.com/vdusek
completedhttps://github.com/apify/apify-client-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#793https://github.com/apify/apify-client-python/pull/793
on May 18, 2026https://github.com/apify/apify-client-python/issues/756#event-25659352572
Sign up for freehttps://github.com/signup?return_to=https://github.com/apify/apify-client-python/issues/756
Sign in to commenthttps://github.com/login?return_to=https://github.com/apify/apify-client-python/issues/756
vdusekhttps://github.com/vdusek
t-toolingIssues with this label are in the ownership of the tooling team.https://github.com/apify/apify-client-python/issues?q=state%3Aopen%20label%3A%22t-tooling%22
3.0https://github.com/apify/apify-client-python/milestone/560
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.