--- id: str2bool version: "1.1" license: unclear license_treatment: permissive maintenance: dormant --- # str2bool — Convert string to boolean License: permissive · Maintenance: dormant · Downloads: 243.4K/mo ## What it is and what it does str2bool is a minimal utility that parses common string representations of truth values into Python booleans. It recognizes 'yes', 'true', 'y', 't', '1' as True and 'no', 'false', 'n', 'f', '0' as False, treating input case-insensitively. The package has no runtime dependencies and is designed as a drop-in function for simple string-to-bool conversion tasks. The package is production-stable but dormant—its last release was 2017-12-25 and it receives no active development. It remains functional for its narrow use case but will not receive bug fixes or feature updates. The high install friction and lack of recent maintenance make it a legacy choice. Use it for: - Parse command-line arguments or config file values that come in as strings like 'yes'/'no' or 'true'/'false' - Convert user input from web forms or APIs into boolean flags without writing custom parsing logic - Handle legacy data imports where boolean values are stored as string representations - Quick boolean coercion in scripts where case-insensitive parsing is needed ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts string representations like 'yes', 'true', '1', 'no', 'false', '0' to Python boolean values, case-insensitive. No. While the package is permissively licensed and has no known vulnerabilities, its high install friction, dormant maintenance status (last release 2017-12-25), and lack of active development make it a poor choice for new projects. Only consider it if you're maintaining legacy code that already depends on it. ## Install pip install str2bool uv add str2bool poetry add str2bool ## Installing str2bool Before you install: Installation friction is high due to distribution as a .zip file. The package is dormant—last release was 2017-12-25 and last commit 2024-07-02—so expect no active maintenance or updates. License in practice: Licensed under BSD (permissive), which allows commercial and private use with minimal restrictions. Quickstart: pip install str2bool from str2bool import str2bool print(str2bool('Yes')) # True print(str2bool('no')) # False Verify before relying: - Whether the high install friction (.zip distribution) reflects current PyPI hosting or a historical artifact - Whether Python 2.7 support claim (per classifiers) is actually functional or outdated ## Package facts - License: not declared (permissive) - Python support: unspecified - Install friction: high - Maintenance: dormant - Downloads: 243.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags string to boolean conversion, parse yes no to bool, str2bool, convert string boolean, case insensitive bool parsing, string-parsing, legacy-unmaintained [View on SkillFed](https://skillfed.io/packages/str2bool) · [View on PyPI](https://pypi.org/project/str2bool/)