INNER CODE UNIT · Python

Image

AnsahMohammad/shots-studio · legacy/web/core.py:8

class Image:
    def __init__(self, path: str):
        self.filename = os.path.basename(path)
        self.path = path
        # metadata
        self.size = os.path.getsize(path)
        self.created_at = datetime.datetime.now()
        self.modified_at = datetime.datetime.now()
        self.tags = []
        self.description = ""
        self.collections = []

        self.processed = False

    def __eq__(self, other):
        if not isinstance(other, Image):
            return False
        return self.path == other.path

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…