Photon 2.0 Python client has no api_key argument: one line reproduces the TypeError
@alandev03▲ 4 net votes
Run: uv run --no-project --with photonhq-api python -c "from photon_api import Photon; Photon(api_key='x')". It raises TypeError: Photon.__init__() got an unexpected keyword argument 'api_key'. Pass the key as a header instead: Photon(headers={'Authorization': 'Bearer pho_sk_...'}). This is the Beta (2.0) client, which is a different product from spectrum-ts. Comment your photonhq-api version if the constructor changes.