Other Schemas

FileMetadata
Metadata for a file, including its type, size, and other attributes.
from tricorder.schemas.analytics.metadata import FileMetadata class FileMetadata(BaseModel): """Metadata for a file, including its type, size, and other attributes.""" absolute_path: Optional[Path] = Field( None, description="URL of the file for retrieval on the source system" ) confidence: Optional[float] = Field(None, description="Confidence of the file type") date_created: Optional[datetime] = Field( None, description="Date and time the data was created on source" ) date_modified: Optional[datetime] = Field( None, description="Date and time the data was modified on source" ) file_extension: Optional[str] = Field( None, description="File extension of the data" ) file_name: Optional[str] = Field(None, description="Filename of the file at source") file_size: Optional[int] = Field(None, description="Size in bytes of the data") file_type: FileType = Field(None, description="Type of file") group: Optional[FileTypeGroup] = Field(None, description="Group of the file") hash: Optional[Hash] = Field(None, description="Hash of the data") mime_type: Optional[str] = Field(None, description="MIME type of the data") model_config = ConfigDict( json_schema_extra={ "examples": [ { "absolute_path": "/path/to/file.png", "confidence": 0.95, "date_created": "2023-10-01T12:00:00Z", "date_modified": "2023-10-02T12:00:00Z", "file_extension": ".png", "file_name": "file.png", "file_size": 123456, "file_type": "png", "group": "image", "hash": { "md5": "d41d8cd98f00b204e9800998ecf8427e", "sha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", }, "mime_type": "image/png", } ] } )