Chargehound Python Bindings

raw JSON →
2.5.0 verified Fri May 01 auth: no python

Chargehound Python bindings for automated chargeback management. Current version 2.5.0. Release cadence is irregular; updates are driven by API changes.

pip install chargehound
error TypeError: __init__() missing 1 required positional argument: 'api_key'
cause Incorrectly omitting api_key or using positional argument in older code.
fix
Use keyword argument: Chargehound(api_key='sk_live_...')
error AttributeError: module 'chargehound' has no attribute 'Chargehound'
cause Importing top-level module instead of specific class.
fix
Use 'from chargehound import Chargehound'
error chargehound.error.AuthenticationError: Invalid API Key provided
cause API key is missing, incorrect, or malformed.
fix
Verify CHARGEHOUND_API_KEY environment variable or the key passed to Chargehound.
error ModuleNotFoundError: No module named 'chargehound.resources'
cause Attempting to import resources directly without proper installation or outdated version.
fix
Upgrade chargehound: pip install --upgrade chargehound
breaking Version 2.0.0 dropped support for Python 2 and changed the client initialization from positional arguments to keyword-only.
fix Use keyword arguments: Chargehound(api_key='sk_...') instead of Chargehound('sk_...').
deprecated The `verify_ssl` parameter is deprecated and will be removed in a future release.
fix Remove `verify_ssl` from client initialization.
gotcha API key must be set via kwarg or environment variable; using `api_key` positional argument will raise TypeError.
fix Always pass api_key as keyword argument: Chargehound(api_key='...').

Initialize client with API key and list disputes.

from chargehound import Chargehound

client = Chargehound(api_key=os.environ.get('CHARGEHOUND_API_KEY', ''))
try:
    disputes = client.disputes.list()
    print(disputes)
except Exception as e:
    print(f'Error: {e}')