-
Notifications
You must be signed in to change notification settings - Fork 331
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
Refactor initialization of storages #85
Comments
In Python, it's usually better to just make a module instead of a singleton - I'm just noting this with |
The resource collection clients, e.g. |
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment has been minimized.
This comment has been minimized.
### Description - Refactor initialization of storages & memory resource clients. - `BaseStorage` and `BaseResourceClients` are only ABC with abstract methods; all the creation-related code is moved to a separate module. - I created `_creation_management.py` helper modules in both `storages/` and `memory_storage_client/`. - I had to move `crawlee/storages/models.py` to `crawlee/models.py` because of the import loops, I merged it with `request.py`. I am open to other ideas in this regard. ### Related issues - #85 ### Testing - Tests pass
closing as it was resolved in #143 |
Description
open()
constructor. And it goes like the following:dataset.open()
base_storage.open()
dataset.__init__()
base_storage.__init__()
base_storage.open()
a specific client is selected (local -MemoryStorageClient
or cloud -ApifyClient
) usingStorageClientManager
.Desired state
The text was updated successfully, but these errors were encountered: