trevorhobenshield / amazon_photos

Amazon Photos API
https://pypi.org/project/amazon_photos
MIT License
44 stars 6 forks source link

Option to lazily initialize db, folders and tree? #13

Open DDoS opened 1 month ago

DDoS commented 1 month ago

These three lines of code in __init__ are very slow (at least for my data), and not always necessary. Would it be possible to make them optional? That would significantly speedup the initialization when just needing to query and download photos.

self.folders = self.get_folders()
self.db = self.load_db(**kwargs)
self.tree = self.build_tree()