sqlalchemy-file
sqlalchemy-file copied to clipboard
Add libcloud import to library itself
As for me, it will be nice, if I import only sqlalchemy_file library to import providers. Of course, it's only my wish :)
For example, fastapi do it with starlette https://github.com/tiangolo/fastapi/blob/master/fastapi/requests.py
Hello @Niccolum,
Thank you for your suggestion,
I think it's a good idea
It will be great to import both libcloud.storage.types.Provider and libcloud.storage.providers.get_driver from sqlalchemy_file
So what @Niccolum proposes is this right?
- from libcloud.storage.drivers.local import LocalStorageDriver
+ from sqlalchemy_file.drivers import LocalStorageDriver
or...
- from libcloud.storage.drivers.local import LocalStorageDriver
+ from sqlalchemy_file import LocalStorageDriver
If that's the case, I highly recommend using this pattern...
- from libcloud.storage.drivers.local import LocalStorageDriver
+ from sqlalchemy_file.storage.drivers.local import LocalStorageDriver
In case, if the user decides to import providers from the libcloud package, only one keyword/name change will be enough.
@hasansezertasan as for me, first or latest example are cool. But first is better, because we don't need to repeat the structure of another package, which can change in future
@hasansezertasan as for me, first or latest example are cool. But first is better, because we don't need to repeat the structure of another package, which can change in future
It's not just "another package", sqlalchemy_file is almost built on top libcloud. Learning libcloud is probably a great gain for the users. I believe we should respect their structure.
So I vote for the latest example... It's the author's choice after all 🙏.