Install & Compatibility
Where this runs
tested against v3.8.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.304s · 21MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.9s · import 0.290s · 21MB
19MB installed
● package 19MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
guessit
✓ import guessit
The main API is a single function import.
guessit.guessit
✓ from guessit import guessit
✗ import guessit; guessit.guessit()
Direct import of the function is cleaner.
Extract metadata from a single filename.
from guessit import guessit
result = guessit('The.Shawshank.Redemption.1994.1080p.BluRay.x264.mkv')
print(result)
# {"title": "The Shawshank Redemption", "year": 1994, "screen_size": "1080p", "source": "BluRay", "video_codec": "x264", "container": "mkv"}
guessit --version
Errors
Common errors & fixes
ImportError: cannot import name 'guessit'
Installed old version or different package; correct import is from guessit import guessit.
fixRun 'pip install guessit' and import with 'from guessit import guessit'.
KeyError: 'title'
In some cases, guessit may not find a title (e.g., noise-only filenames). The returned dict might lack expected keys.
fixAlways use .get('title', 'unknown') or check key existence. TypeError: guessit() got multiple values for keyword argument 'output'
Passing deprecated 'output' parameter in newer versions.
fixUse options={'output_format': 'json'} instead of output='json'. Upgrade
Version history
3.8.0latest on PyPI · released Dec 14, 2023
Audit
Dependencies
python-dateutiloptionalParsing date patterns in filenames
PyYAMLoptionalLoading custom rules from YAML files
babelfishoptionalLanguage and country detection