-
Notifications
You must be signed in to change notification settings - Fork 17
refactor: Extract API storage client creation from the Apify storage code #663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Refactoring refactoring to the discussion in: |
Without additional inheritance in individual storage clients.
64ccb91 to
7c40de0
Compare
Pijukatel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine with this approach as well. Just some small comments
|
|
||
| async def create_api_client( | ||
| *, | ||
| storage_type: Literal['key_value_store', 'request_queue', 'dataset'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any benefit in keeping this virtual mapping between class and literal?
Why not use the class directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import hell (circular imports) - this is a better approach, trust me, I've been there 😄
vdusek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
openmethod toApiClientFactoryopenmethods of Apify storages.