{"id":21791,"library":"pysha3","title":"pysha3","description":"SHA-3 (Keccak) hash functions for Python 2.7 to 3.5. Version 1.0.2 is the latest, released in 2017. The library is unmaintained and incompatible with Python 3.6+ due to the `hashlib` standard library having built-in SHA-3 support.","status":"deprecated","version":"1.0.2","language":"python","source_language":"en","source_url":"https://github.com/tiran/pysha3","tags":["sha3","keccak","hash","cryptography","deprecated"],"install":[{"cmd":"pip install pysha3","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Many users try hashlib.sha3_224() which does not exist in Python <3.6.","symbol":"sha3_224","correct":"from pysha3 import sha3_224"},{"note":"hashlib.sha3_256 is only available in Python 3.6+. On older versions, use pysha3.","wrong":"import hashlib; hashlib.sha3_256()","symbol":"sha3_256","correct":"from pysha3 import sha3_256"}],"quickstart":{"code":"from pysha3 import sha3_256\nh = sha3_256(b'hello')\nprint(h.hexdigest())  # Output: 3338be694f50c5f338814986cdf0686453a40b544b9f7c2e8b8b3d0b6f1f3c1e","lang":"python","description":"Create a SHA3-256 hash of b'hello' using pysha3."},"warnings":[{"fix":"Replace `from pysha3 import sha3_256` with `import hashlib; hashlib.sha3_256()`","message":"pysha3 is unmaintained and only supports Python up to 3.5. For Python 3.6+, use hashlib.sha3_* from the standard library.","severity":"deprecated","affected_versions":">=3.6"},{"fix":"Always confirm the expected output against known test vectors.","message":"pysha3 output may differ from other SHA-3 implementations due to different padding rules for Keccak. Ensure compatibility with your application.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `hashlib.sha3_256()` instead.","message":"Python 3.6+ included SHA-3 in hashlib, making pysha3 obsolete. Importing pysha3 on Python 3.6+ will still work but is redundant.","severity":"breaking","affected_versions":">=3.6"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install pysha3: `pip install pysha3`. For Python 3.6+, consider using hashlib.sha3_* instead.","cause":"pysha3 is not installed or Python version is 3.6+ where it is not needed.","error":"No module named 'pysha3'"},{"fix":"Install pysha3: `pip install pysha3` and use `from pysha3 import sha3_256`.","cause":"Python version is <3.6, which does not have built-in SHA-3 in hashlib.","error":"AttributeError: module 'hashlib' has no attribute 'sha3_256'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}