Metadata-Version: 2.4
Name: mimey
Version: 0.1.3
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Summary: A fast and efficient MIME type and file extension detector implemented in Rust, exposed as a Python package.
Keywords: MIME,file type detection,Rust,Python
Home-Page: https://github.com/4thel00z/mimey
License-Expression: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# 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
```python
>>> 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.

