@@ -25,7 +25,6 @@ def refresh_token(self, token_url, **kwargs):
2525class BaseClient :
2626 """The Commercetools Client, used to interact with the Commercetools API.
2727
28- :param project_key: the key for the project with which you want to interact
2928 :param client_id: the oauth2 client id
3029 :param client_secret: the oauth2 client secret
3130 :param scope: the oauth2 scope. If None then 'manage_project:{project_key}'
@@ -41,7 +40,6 @@ class BaseClient:
4140
4241 def __init__ (
4342 self ,
44- project_key : str = None ,
4543 client_id : str = None ,
4644 client_secret : str = None ,
4745 scope : typing .List [str ] = None ,
@@ -52,15 +50,14 @@ def __init__(
5250 ) -> None :
5351 # Use environment variables as fallback
5452 config = {
55- "project_key" : project_key or "example-project" ,
5653 "client_id" : client_id ,
5754 "client_secret" : client_secret ,
5855 "url" : url ,
5956 "token_url" : token_url ,
6057 "scope" : scope ,
6158 }
6259 # Make sure we use the config vars
63- del project_key , client_id , client_secret , url , token_url , scope
60+ del client_id , client_secret , url , token_url , scope
6461
6562 self ._config = self ._read_env_vars (config )
6663 self ._config ["token_url" ] = fix_token_url (self ._config ["token_url" ])
@@ -192,9 +189,6 @@ def _create_exception(self, obj, response) -> CommercetoolsError:
192189 return CommercetoolsError (obj .message , errors_raw , obj , correlation_id )
193190
194191 def _read_env_vars (self , config : dict ) -> dict :
195- if not config .get ("project_key" ):
196- config ["project_key" ] = os .environ .get ("CTP_PROJECT_KEY" )
197-
198192 if not config .get ("client_id" ):
199193 config ["client_id" ] = os .environ .get ("CTP_CLIENT_ID" )
200194
@@ -211,8 +205,6 @@ def _read_env_vars(self, config: dict) -> dict:
211205 config ["scope" ] = os .environ .get ("CTP_SCOPES" )
212206 if config ["scope" ]:
213207 config ["scope" ] = config ["scope" ].split ("," )
214- else :
215- config ["scope" ] = ["manage_project:%s" % config ["project_key" ]]
216208
217209 for key , value in config .items ():
218210 if value is None :
0 commit comments