apify-sdk-python
apify-sdk-python copied to clipboard
Compose Actor class of smaller components
_ActorType aliased as Actor is very big class with many methods. https://github.com/apify/apify-sdk-python/blob/master/src/apify/_actor.py#L42
It is entry point of SDK and it would be nice if it was nicely structured. Having too many methods on such "mega class" makes it harder to understand and use. Refactor this class and move it's methods into components, so that user can use SDK through logically structured groups of functionality.
Generic example: Instead of: actor.some_function_to_handle_inputs actor.other_function_to_handle_inputs
it should be: actor.inputs.some_function_to_handle_inputs actor.inputs.other_function_to_handle_inputs
https://github.com/apify/apify-sdk-python/pull/326#discussion_r1846002446
I wanted to see some concrete example, and this generic one really sounds like you want to change the public API, which is not an option.