MIFpy
mifpy is a lightweight Python library for the Movie Information Format (.mif), a ZIP-based container format for movie metadata, subtitles, actor appearance timelines, and associated assets.
Features
- Load and save
.mifarchives using Pythonzipfile - Validate required package files and formats
- Parse
manifest.ini,meta.ini,appearances.json, andsubtitles.srt - Add content assets under
content/ - CLI support:
inspect,extract, andcreate
Package structure
A valid .mif archive contains:
manifest.inimeta.inisubtitles.srtappearances.jsoncontent/(optional)
Installation
Install with Poetry:
poetry install
Usage
from mifpy import MIFPackage
pkg = MIFPackage.create(
meta={"title": "The Matrix", "year": 1999, "runtime_ms": 8160000},
subtitles="1\n00:00:00,000 --> 00:00:02,000\nWake up, Neo.\n",
appearances={
"actors": {
"keanu_reeves": {
"name": "Keanu Reeves",
"image": "content/keanu.png",
}
},
"appearances": [
{"actor": "keanu_reeves", "start_ms": 1000, "end_ms": 10000}
],
},
)
pkg.add_content_file("keanu.png", b"<raw-image-bytes>")
pkg.save("movie.mif")
CLI
mifpy inspect movie.mif
mifpy extract movie.mif ./out
mifpy create sample.mif
Testing
Run tests with:
poetry run pytest
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mifpy-1.0.0.tar.gz
(6.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
mifpy-1.0.0-py3-none-any.whl
(9.1 kB
view details)
File details
Details for the file mifpy-1.0.0.tar.gz.
File metadata
- Download URL: mifpy-1.0.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/2.2.1 CPython/3.14.3 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5285382c8625d07f2752c658aefd39b8682135689535058a34bc82af25754ec5
|
|
| MD5 |
c8a463a505ca1a1fc67d8a8bd0d01878
|
|
| BLAKE2b-256 |
c3ca62957b90441394e9a52d23f429b6e957ddb87683b20e31dac88d3022252d
|
File details
Details for the file mifpy-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mifpy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/2.2.1 CPython/3.14.3 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f2851e4b20936862db4435951f19b37a52f7d74cf036440cf3b1cd0d4367273
|
|
| MD5 |
b817502c70e9cd357df0461cf42dd870
|
|
| BLAKE2b-256 |
6e0abc630766bb8f6b4e8877c020363cc5361df644023e420c16fa2748ee944e
|