{"id":23903,"library":"ishex","title":"ishex","description":"Simple Python package to check if a string is valid hexadecimal. Current version 1.1.0, updated infrequently.","status":"active","version":"1.1.0","language":"python","source_language":"en","source_url":"https://github.com/xhelphin/ishex","tags":["hex","validation","string","utility"],"install":[{"cmd":"pip install ishex","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Module is 'ishex' (all lowercase), but function names are camelCase.","wrong":"import ishex","symbol":"isHex","correct":"from ishex import isHex"}],"quickstart":{"code":"from ishex import isHex, isHexLower, isHexUpper\n\n# Validate a hex string\nprint(isHex(\"1a2b3f\"))  # True\nprint(isHex(\"0x1a2b3f\")) # True (with 0x prefix)\nprint(isHex(\"xyz\"))     # False\n\n# Validate case-specific\nprint(isHexLower(\"1a2b\")) # True\nprint(isHexUpper(\"1A2B\")) # True","lang":"python","description":"Basic usage: check if string is hexadecimal, with optional case validation."},"warnings":[{"fix":"Use 'from ishex import isHex' not 'import ishex' then call 'ishex.isHex' (though that also works, but the function is isHex).","message":"Function names use camelCase (isHex, isHexLower, isHexUpper) while package name is all lowercase (ishex). Ensure correct casing when importing.","severity":"gotcha","affected_versions":"all"},{"fix":"If you need to reject prefixes, strip them before calling isHex().","message":"The functions accept optional '0x' or '0X' prefix by default and treat them as valid hex. Some other hex checkers may reject prefixes. Be aware if you need strict no-prefix validation.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider alternatives like 'binascii' or a custom check if you need active maintenance.","message":"Package is very small and not actively maintained. Last release 1.1.0 (2022). No future updates guaranteed.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install ishex; then use 'from ishex import isHex'.","cause":"Importing with wrong casing; module name is all lowercase 'ishex'.","error":"ModuleNotFoundError: No module named 'isHex'"},{"fix":"Ensure import: 'from ishex import isHex'.","cause":"Attempting to call isHex() without importing it correctly.","error":"NameError: name 'isHex' is not defined"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}