- 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, Literal types provide the same level of safety as enums. - Fewer footguns - The usage of enums can easily lead to bugs like this one: https://github.com/apify/apify-client-python/pull/575. - Consistency across our tooling - We already prefer literals in Crawlee and the SDK. ### Scope - 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. ### Compatibility - This is a breaking change, so it should be tracked and implemented as part of apify-python-client v3.