一键导入
content-types
A library to map file extensions to content types and vice versa. Use when writing Python code that uses the content_types package.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
A library to map file extensions to content types and vice versa. Use when writing Python code that uses the content_types package.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | content-types |
| description | A library to map file extensions to content types and vice versa. Use when writing Python code that uses the content_types package. |
| license | MIT |
| compatibility | Requires Python >=3.10. |
A library to map file extensions to content types and vice versa.
pip install content-types
Map a filename, bare extension, Path, or URL to its MIME / content type.
get_content_type: Return the most specific, commonly accepted MIME type for a filename or extensionMap a MIME / content type back to its file extension(s) — the inverse of get_content_type.
guess_extension: Return the canonical file extension for a MIME / content typeguess_all_extensions: Return every known file extension for a MIME / content type, canonical firstThe underlying extension -> content-type table (364 entries; keys have no leading dot).
EXTENSION_TO_CONTENT_TYPE: dict() -> new empty dictionaryPrecomputed content types for very common formats, exposed as module-level attributes.
webp: str(object='') -> strpng: str(object='') -> strjpg: str(object='') -> strmp3: str(object='') -> strjson: str(object='') -> strpdf: str(object='') -> strzip: str(object='') -> strxml: str(object='') -> strcsv: str(object='') -> strmd: str(object='') -> strparquet: str(object='') -> stripynb: str(object='') -> strpkl: str(object='') -> stryaml: str(object='') -> strtoml: str(object='') -> strsqlite: str(object='') -> str