A lightweight pure Python package to check if a file is binary or text (fork of binaryornot). Current version 1.0.1, released April 2023. Uses heuristic scanning of a configurable chunk of bytes.
pip install isbinaryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic usage to detect binary vs text file.
Replace `from binaryornot.check import is_binary` with `from isbinary import is_binary_file`.
Change all calls from `is_binary(path)` to `is_binary_file(path)`.
If needed, adjust chunk size with the `chunk_size` parameter: `is_binary_file(path, chunk_size=1024)`.
Ensure you run on Python 3.8 or later.
Install isbinary and update imports: `from isbinary import is_binary_file`.
Use `from isbinary import is_binary_file`.
Use `from isbinary import is_binary_file` and call `is_binary_file(path)`.
No dependency data recorded yet.