$npx skillfedfor your agent

isbinary

Lightweight pure Python package to check if a file is binary or text.

With conditionsPyPI UtilitiesReleased May 202276.9K downloads / moBSDPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — isbinary-1.0.1-py3-none-any.whl
v1.0.1 · released 2022-05-22 · Python >=3.8,<4.0 · 1 runtime deps: chardet

Yes, if you need reliable binary/text detection and can accept that the package is unmaintained. It has no known vulnerabilities, low install friction, and solves a genuine problem with a proven heuristic. However, do not install if you require ongoing maintenance, support for edge cases discovered after May 2022, or compatibility with Python versions beyond 3.10—the last commit was over three years ago.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.8 or later (supports 3.8, 3.9, 3.10); chardet must be installed as a runtime dependency.
  • Installation is straightforward with low friction.
  • However, the package is abandoned—last release was 2022-05-22 with no updates since, though the repository remains public and the code is stable enough for basic use.

License · maintenance · safety

BSD (permissive) — Licensed under BSD (permissive), so you can use, modify, and distribute it freely with minimal restrictions, though the license treatment is listed as 'Other/Proprietary' in classifiers despite the BSD declaration.

last release 2022-05-22 (1545 days) · last repo commit 2022-05-22 · 3 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 76,900 downloads/mo, #14,582 on PyPI

Verify before relying

pip install isbinary

from isbinary.helpers import is_binary_file

if is_binary_file('path/to/file'):
    print('Binary file')
else:
    print('Text file')
  • Whether the heuristic handles all modern file types and encodings reliably, or if edge cases remain unresolved as the description suggests.
  • Performance characteristics when analyzing large files or many files in batch.
  • Compatibility with Python versions beyond 3.10, given the package is abandoned and no longer maintained.
Same gist for agents: .md · .json

What it is and what it does

isbinary is a lightweight pure-Python library that guesses whether a file is binary or text by examining its content using a heuristic based on Perl's pp_fttext algorithm. It uses chardet for encoding detection and has been tested against common file types (.txt, .json, .png, .jpg, etc.) and multiple encodings. The package was forked from the abandoned binaryornot project in May 2022 to add type annotations, modernize CI tooling, and drop Python 2 support.

The library solves a deceptively complex problem: naive approaches like checking for null bytes or trying to decode as UTF-8 fail on real-world files. isbinary encapsulates a battle-tested heuristic that handles edge cases across different platforms and file encodings, saving you from writing and thoroughly testing this logic yourself. However, the package itself is now abandoned—no updates since its initial release—so it will not receive bug fixes or support for newly discovered edge cases.

Use it for

  • Filter files in a directory walk to process only text files, skipping binaries like images or compiled objects.
  • Validate user-uploaded files in a web application to reject binary uploads when only text is expected.
  • Preprocess data pipelines to separate text and binary files for different downstream handlers.
  • Build development tools that need to distinguish text source files from binary artifacts in a repository.
  • Implement file-type guards in backup or sync utilities to handle text and binary files differently.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need reliable binary/text detection and can accept that the package is unmaintained.

It has no known vulnerabilities, low install friction, and solves a genuine problem with a proven heuristic. However, do not install if you require ongoing maintenance, support for edge cases discovered after May 2022, or compatibility with Python versions beyond 3.10—the last commit was over three years ago.

Install

isbinary on PyPI

Before you install

Installation is straightforward with low friction. However, the package is abandoned—last release was 2022-05-22 with no updates since, though the repository remains public and the code is stable enough for basic use.

Requires Python 3.8 or later (supports 3.8, 3.9, 3.10); chardet must be installed as a runtime dependency.

License in practice

Licensed under BSD (permissive), so you can use, modify, and distribute it freely with minimal restrictions, though the license treatment is listed as 'Other/Proprietary' in classifiers despite the BSD declaration.

Quickstart

pip install isbinary

from isbinary.helpers import is_binary_file

if is_binary_file('path/to/file'):
    print('Binary file')
else:
    print('Text file')

Verify before relying

  • Whether the heuristic handles all modern file types and encodings reliably, or if edge cases remain unresolved as the description suggests.
  • Performance characteristics when analyzing large files or many files in batch.
  • Compatibility with Python versions beyond 3.10, given the package is abandoned and no longer maintained.

Package facts

LicenseBSD permissive
Python supportSupports the current Python release >=3.8,<4.0
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
chardet
MaintenanceAbandoned 1,545 days since the last release
Last repo commit
First released
Downloads76,900 / month, #14,582 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: Other/Proprietary LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: isbinary-1.0.1-py3-none-any.whl

Tags

Capabilities
detect binary vs text filefile type detection pythonis file binarytext file checkerbinary file identificationfile content analysisencoding detection
Topics
file-detectionunmaintained
PyPI keywords
binaryfile

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “detect binary vs text file”

  • isbinaryDetermines whether a file is binary or text by analyzing its content…
  • binaryornotDetermines whether a file is binary or text by analyzing its byte…
  • hanzidentifierIdentifies whether a string contains Simplified Chinese, Traditional…

Give your agent the search over MCP, or paste the wish link into any chat.

More Utilities packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also binaryornot · cchardet · chardet · faust-cchardet · file-magic · types-chardet · mikeshardmind-base2048 · cigam · encutils