{"id":46298,"library":"safe-eth-py","title":"safe-eth-py","description":"Python library from the Safe Ecosystem Foundation for Ethereum projects. Provides utilities for transaction building, Gnosis Safe multisig interaction, EIP-712 signatures, and Ethereum client communication. Current version 7.21.0, requires Python >=3.10. Active development with frequent releases.","status":"active","version":"7.21.0","language":"python","source_language":"en","source_url":"https://github.com/safe-global/safe-eth-py","tags":["safe","ethereum","gnosis-safe","multisig","blockchain"],"install":[{"cmd":"pip install safe-eth-py","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"Old gnosis package path replaced by safe_eth in v4+","wrong":"from gnosis.safe import Safe","symbol":"Safe","correct":"from safe_eth.eth import EthereumClient, EthereumNetwork\nfrom safe_eth.safe import Safe"},{"note":"EthereumClient is in safe_eth.eth submodule","wrong":"from safe_eth import EthereumClient","symbol":"EthereumClient","correct":"from safe_eth.eth import EthereumClient"},{"note":"","wrong":"","symbol":"SafeTx","correct":"from safe_eth.safe import SafeTx"},{"note":"","wrong":"","symbol":"EthereumNetwork","correct":"from safe_eth.eth import EthereumNetwork"},{"note":"Part of safe subpackage, not eth","wrong":"from safe_eth.eth import ProxyFactory","symbol":"ProxyFactory","correct":"from safe_eth.safe import ProxyFactory"}],"quickstart":{"code":"import os\nfrom safe_eth.eth import EthereumClient, EthereumNetwork\nfrom safe_eth.safe import Safe\n\n# Connect to Ethereum client (replace YOUR_NODE_URL)\nethereum_client = EthereumClient(os.environ.get('ETHEREUM_NODE_URL', 'https://mainnet.infura.io/v3/YOUR_PROJECT_ID'))\n\n# Load a Safe (replace with a real address)\nsafe_address = '0x1230B3d59858296A31053C1b8562Ecf89A2f888b'\nsafe = Safe(safe_address, ethereum_client)\n\n# Retrieve Safe info\ninfo = safe.retrieve_all_info()\nprint(f'Safe owners: {info.owners}')\nprint(f'Safe threshold: {info.threshold}')\nprint(f'Safe nonce: {info.nonce}')","lang":"python","description":"Connect to an Ethereum node, load a Gnosis Safe, and retrieve its current owners, threshold, and nonce."},"warnings":[{"fix":"Replace 'from gnosis...' with 'from safe_eth...'","message":"safe-eth-py v6.0.0 removed the 'gnosis' top-level package. All imports must use 'safe_eth' prefix.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Update code to use web3 v7 API (e.g., Account.sign_transaction instead of Account.signTransaction).","message":"safe-eth-py v7.0.0 upgraded web3 dependency to v7, which introduced breaking changes in transaction signing and encoding.","severity":"breaking","affected_versions":">=7.0.0"},{"fix":"Use a dedicated node or consider retry logic with multiple providers.","message":"EthereumClient requires a valid Ethereum node URL. Using a free Infura endpoint may hit rate limits quickly.","severity":"gotcha","affected_versions":"all"},{"fix":"Use Safe.retrieve_owners(), Safe.retrieve_threshold(), etc.","message":"Safe.retrieve_all_info() is deprecated; use Safe.retrieve_all_info() (still works but may be removed). Prefer individual methods like .retrieve_owners(), .retrieve_threshold(), .retrieve_nonce().","severity":"deprecated","affected_versions":">=7.0.0"}],"env_vars":null,"search_vec":"'-712':25 '3.10':36 '7.21.0':33 'activ':37 'blockchain':48 'build':19 'client':29 'communic':30 'current':31 'develop':38 'ecosystem':10 'eip':24 'eth':3 'ethereum':13,28,43 'foundat':11 'frequent':40 'gnosi':20,45 'gnosis-saf':44 'interact':23 'librari':6 'multisig':22,47 'project':14 'provid':15 'py':4 'python':5,35 'releas':41 'requir':34 'safe':2,9,21,42,46 'safe-eth-pi':1 'signatur':26 'transact':18 'util':16 'version':32","created_at":"2026-06-07T12:59:14.639870+00:00","updated_at":"2026-06-07T12:59:14.639870+00:00","problems":[{"fix":"Replace all 'from gnosis...' imports with 'from safe_eth...'","cause":"safe-eth-py v6+ renamed the top-level package from 'gnosis' to 'safe_eth'.","error":"ModuleNotFoundError: No module named 'gnosis'"},{"fix":"Use 'from safe_eth.eth import EthereumClient'","cause":"EthereumClient is not exported from the root safe_eth package; it's in the safe_eth.eth submodule.","error":"ImportError: cannot import name 'EthereumClient' from 'safe_eth'"},{"fix":"Use EthereumNetwork.from_chain_id(chain_id) or manually set network.","cause":"EthereumNetwork enum may not include all chain IDs; client may not recognize the network.","error":"ValueError: The network ID 1 is not supported"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/safe-global/safe-eth-py","github":"https://github.com/safe-global/safe-eth-py","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["security","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}