INNER CODE UNIT · Python

get_info

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

    def get_info(self):
        return {
            "filename": self.filename,
            "path": self.path,
            "size": self.size,
            "created_at": self.created_at,
            "modified_at": self.modified_at,
            "tags": self.tags,
            "description": self.description,
            "collections": [c.name for c in self.collections],
        }

    def update_metadata(self):
        self.size = os.path.getsize(self.path)
        self.modified_at = datetime.datetime.now()

    def add_tag(self, tag: str):
        self.tags.append(tag)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…