{"author_url":"https://blog.hatena.ne.jp/kagasu/","author_name":"kagasu","categories":["Python"],"title":"Python\u3067Magika\u3092\u5229\u7528\u3057\u3066MIME\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5","url":"https://kagasu.hatenablog.com/entry/2025/11/24/150854","image_url":null,"description":"\u2160. \u306f\u3058\u3081\u306b \u30bf\u30a4\u30c8\u30eb\u306e\u901a\u308a\u300cPython\u3067Magika\u3092\u5229\u7528\u3057\u3066MIME\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u300d\u3067\u3059\u3002 \u2161. \u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0 # pip install magika from magika import Magika magika = Magika() with open('c:\\\\test.png', 'rb') as f: res = magika.identify_stream(f) print(res.output.label) print(res.output.mime_type) \u5b9f\u884c\u7d50\u679c png image/png \u53c2\u8003 https://github.com/google/ma\u2026","blog_url":"https://kagasu.hatenablog.com/","height":"190","width":"100%","provider_url":"https://hatena.blog","version":"1.0","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkagasu.hatenablog.com%2Fentry%2F2025%2F11%2F24%2F150854\" title=\"Python\u3067Magika\u3092\u5229\u7528\u3057\u3066MIME\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5 - \u5099\u5fd8\u9332\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2025-11-24 15:08:54","blog_title":"\u5099\u5fd8\u9332","type":"rich"}