Skip to main content

A fast and efficient MIME type and file extension detector implemented in Rust, exposed as a Python package.

Project description

mimey

Motivation

A fast mime parser written in Rust and exposed as python package.

Installation

uv add mimey

or

pip install mimey

Usage

Detect a type

>>> import mimey
>>> mimey.detect_type(b"\x89PNG\r\n\x1a\n")
'.png'

Detect the mimetype

>>> import mimey
>>> mimey.detect_mime(b"\x89PNG\r\n\x1a\n")
'image/png'

TODOs

  • Add a mechanism to register new mime types.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mimey-0.1.3.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mimey-0.1.3-cp312-cp312-macosx_11_0_arm64.whl (208.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file mimey-0.1.3.tar.gz.

File metadata

  • Download URL: mimey-0.1.3.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for mimey-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8ddb527bbf9bfa12c45d1ebe59c9307de1738a81df4a8cff8483ea1b9b0c8aef
MD5 6b1f18593960d048b17b1b3786f22bc3
BLAKE2b-256 9faace071101ef194faa588bb2b3dfb2ce0214adfc59e8b11dd626f83543c00b

See more details on using hashes here.

File details

Details for the file mimey-0.1.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mimey-0.1.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 be1b74c2781cb97e28309da698a3611fbda0eb109723a505321be2f52a44021a
MD5 679326ae11eac0b70f05a6e255d7743b
BLAKE2b-256 a47e90ef77073a238db00ffb229e6f635a4751e86bc15fae9e39f6eb1be8d497

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page