Registry / serialization / ishex
library1.1.0pypypi✓ verified 79d ago

Simple Python package to check if a string is valid hexadecimal. Current version 1.1.0, updated infrequently.

pip install ishex
INSTALL
IMPORT
SIG · ISHEX
I
ishex
serializationpythonv1.1.0
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

isHex
from isHex import isHex
from ishex import isHex
isHexLower
from isHex import isHexLower
isHexUpper
from isHex import isHexUpper

Basic usage: check if string is hexadecimal, with optional case validation.

from ishex import isHex, isHexLower, isHexUpper # Validate a hex string print(isHex("1a2b3f")) # True print(isHex("0x1a2b3f")) # True (with 0x prefix) print(isHex("xyz")) # False # Validate case-specific print(isHexLower("1a2b")) # True print(isHexUpper("1A2B")) # True
Debug
Known issues
gotchaFunction names use camelCase (isHex, isHexLower, isHexUpper) while package name is all lowercase (ishex). Ensure correct casing when importing.
fix
Use 'from ishex import isHex' not 'import ishex' then call 'ishex.isHex' (though that also works, but the function is isHex).
affects: all
gotchaThe 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.
fix
If you need to reject prefixes, strip them before calling isHex().
affects: all
gotchaPackage is very small and not actively maintained. Last release 1.1.0 (2022). No future updates guaranteed.
fix
Consider alternatives like 'binascii' or a custom check if you need active maintenance.
affects: all
Upgrade
Version history
1.1.0latest on PyPI · released Mar 1, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
ishex — pip install ishex · libregistry