René's URL Explorer Experiment


Title: Prefer using literal types over enums · Issue #576 · apify/apify-client-python · GitHub

Open Graph Title: Prefer using literal types over enums · Issue #576 · apify/apify-client-python

X Title: Prefer using literal types over enums · Issue #576 · apify/apify-client-python

Description: We should prefer typing.Literal types over enum.Enum. Motivation Better developer experience - Literals can be passed directly as values, without requiring additional imports. Type safety is preserved - When used with a type checker, Lit...

Open Graph Description: We should prefer typing.Literal types over enum.Enum. Motivation Better developer experience - Literals can be passed directly as values, without requiring additional imports. Type safety is preser...

X Description: We should prefer typing.Literal types over enum.Enum. Motivation Better developer experience - Literals can be passed directly as values, without requiring additional imports. Type safety is preser...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Prefer using literal types over enums","articleBody":"- We should prefer `typing.Literal` types over `enum.Enum`.\n\n### Motivation\n\n- Better developer experience - Literals can be passed directly as values, without requiring additional imports.\n- Type safety is preserved - When used with a type checker, Literal types provide the same level of safety as enums.\n- Fewer footguns - The usage of enums can easily lead to bugs like this one: https://github.com/apify/apify-client-python/pull/575.\n- Consistency across our tooling - We already prefer literals in Crawlee and the SDK.\n\n### Scope\n\n- This primarily applies to constants currently defined as enums, especially those in: https://github.com/apify/apify-shared-python/blob/master/src/apify_shared/consts.py.\n\n### Compatibility\n\n- This is a breaking change, so it should be tracked and implemented as part of apify-python-client v3.","author":{"url":"https://github.com/vdusek","@type":"Person","name":"vdusek"},"datePublished":"2026-01-09T14:42:04Z","url":"https://github.com/apify/apify-client-python/issues/576"}

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:9e92609e-5157-04ca-f462-5ea45852c1b4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9844:22E601:FFFAC2:1582BFA:6B005D8B
html-safe-nonce085420264d1b48ef84c2b5f0dca1c0ccc52655779d2b86ec1f789a3b9e30aaec
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODQ0OjIyRTYwMTpGRkZBQzI6MTU4MkJGQTo2QjAwNUQ4QiIsInZpc2l0b3JfaWQiOiI2MDM2NTY1MzgyMjkzMTE4MzQ3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac32beba3bee5616d369cbef8021f4afee3018ac1a1c7e6b938da80367dc8dfdb8
hovercard-subject-tagissue:3797196341
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/576/issue_layout
twitter:imagehttps://opengraph.githubassets.com/847767e0c068145a44932b566619d5463a7d2c03053f216e36b9e0ea5d4dec84/apify/apify-client-python/issues/576
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/847767e0c068145a44932b566619d5463a7d2c03053f216e36b9e0ea5d4dec84/apify/apify-client-python/issues/576
og:image:altWe should prefer typing.Literal types over enum.Enum. Motivation Better developer experience - Literals can be passed directly as values, without requiring additional imports. Type safety is preser...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevdusek
hostnamegithub.com
expected-hostnamegithub.com
None29be975efff6507a5d135de9c7d634cf7ff8f0c55222a64386ab3202209aaf73
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
releaseeacd927ba6112e3b01ba99c762bd699a4a4f5df7
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/apify/apify-client-python/issues/576#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapify%2Fapify-client-python%2Fissues%2F576
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%2F576
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/576
Reloadhttps://github.com/apify/apify-client-python/issues/576
Reloadhttps://github.com/apify/apify-client-python/issues/576
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/576
New issuehttps://github.com/login?return_to=https://github.com/apify/apify-client-python/issues/576
#759https://github.com/apify/apify-client-python/pull/759
Prefer using literal types over enumshttps://github.com/apify/apify-client-python/issues/576#top
#759https://github.com/apify/apify-client-python/pull/759
https://github.com/vdusek
debtCode quality improvement or decrease of technical debt.https://github.com/apify/apify-client-python/issues?q=state%3Aopen%20label%3A%22debt%22
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 Jan 9, 2026https://github.com/apify/apify-client-python/issues/576#issue-3797196341
fix: Fix force permissions serialization for Actor calls #575https://github.com/apify/apify-client-python/pull/575
https://github.com/apify/apify-shared-python/blob/master/src/apify_shared/consts.pyhttps://github.com/apify/apify-shared-python/blob/master/src/apify_shared/consts.py
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
debtCode quality improvement or decrease of technical debt.https://github.com/apify/apify-client-python/issues?q=state%3Aopen%20label%3A%22debt%22
on Jan 9, 2026https://github.com/apify/apify-client-python/issues/576#event-21948971997
vdusekhttps://github.com/vdusek
3.0https://github.com/apify/apify-client-python/milestone/560
on Jan 9, 2026https://github.com/apify/apify-client-python/issues/576#event-21948992625
B4nanhttps://github.com/B4nan
vdusekhttps://github.com/vdusek
on Jan 20, 2026https://github.com/apify/apify-client-python/issues/576#event-22159817702
vdusekhttps://github.com/vdusek
on Apr 27, 2026https://github.com/apify/apify-client-python/issues/576#event-24911237586
feat: generate Literal type aliases instead of StrEnum classeshttps://github.com/apify/apify-client-python/commit/66da403837c744fd91ef8f4ce975ce20fcf030b3
https://docs.github.com/articles/closing-issues-via-commit-messages
66da403https://github.com/apify/apify-client-python/commit/66da403837c744fd91ef8f4ce975ce20fcf030b3
feat: generate Literal type aliases instead of StrEnum classes (#759)https://github.com/apify/apify-client-python/commit/2bf5a75f38a74a48c5c9a9682d9eaf330da27935
#759https://github.com/apify/apify-client-python/pull/759
https://docs.github.com/articles/closing-issues-via-commit-messages
2bf5a75https://github.com/apify/apify-client-python/commit/2bf5a75f38a74a48c5c9a9682d9eaf330da27935
vdusekhttps://github.com/vdusek
completedhttps://github.com/apify/apify-client-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#759https://github.com/apify/apify-client-python/pull/759
on May 3, 2026https://github.com/apify/apify-client-python/issues/576#event-25110334096
Sign up for freehttps://github.com/signup?return_to=https://github.com/apify/apify-client-python/issues/576
Sign in to commenthttps://github.com/login?return_to=https://github.com/apify/apify-client-python/issues/576
vdusekhttps://github.com/vdusek
debtCode quality improvement or decrease of technical debt.https://github.com/apify/apify-client-python/issues?q=state%3Aopen%20label%3A%22debt%22
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.