Metadata-Version: 2.4
Name: mimey
Version: 0.1.2
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Home-Page: https://github.com/4thel00z/mimey
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.

