Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Safe
✓ from safe_eth.eth import EthereumClient, EthereumNetwork
from safe_eth.safe import Safe
✗ from gnosis.safe import Safe
Old gnosis package path replaced by safe_eth in v4+
EthereumClient
✓ from safe_eth.eth import EthereumClient
✗ from safe_eth import EthereumClient
EthereumClient is in safe_eth.eth submodule
SafeTx
✓ from safe_eth.safe import SafeTx
EthereumNetwork
✓ from safe_eth.eth import EthereumNetwork
ProxyFactory
✓ from safe_eth.safe import ProxyFactory
✗ from safe_eth.eth import ProxyFactory
Part of safe subpackage, not eth
Connect to an Ethereum node, load a Gnosis Safe, and retrieve its current owners, threshold, and nonce.
import os
from safe_eth.eth import EthereumClient, EthereumNetwork
from safe_eth.safe import Safe
# Connect to Ethereum client (replace YOUR_NODE_URL)
ethereum_client = EthereumClient(os.environ.get('ETHEREUM_NODE_URL', 'https://mainnet.infura.io/v3/YOUR_PROJECT_ID'))
# Load a Safe (replace with a real address)
safe_address = '0x1230B3d59858296A31053C1b8562Ecf89A2f888b'
safe = Safe(safe_address, ethereum_client)
# Retrieve Safe info
info = safe.retrieve_all_info()
print(f'Safe owners: {info.owners}')
print(f'Safe threshold: {info.threshold}')
print(f'Safe nonce: {info.nonce}')
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'gnosis'
safe-eth-py v6+ renamed the top-level package from 'gnosis' to 'safe_eth'.
fixReplace all 'from gnosis...' imports with 'from safe_eth...'
ImportError: cannot import name 'EthereumClient' from 'safe_eth'
EthereumClient is not exported from the root safe_eth package; it's in the safe_eth.eth submodule.
fixUse 'from safe_eth.eth import EthereumClient'
ValueError: The network ID 1 is not supported
EthereumNetwork enum may not include all chain IDs; client may not recognize the network.
fixUse EthereumNetwork.from_chain_id(chain_id) or manually set network.
Upgrade
Version history
7.21.0latest on PyPI · released Apr 22, 2026
Audit
Dependencies
No dependency data recorded yet.