We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bfa14e commit c7d5addCopy full SHA for c7d5add
templates/python/config.mustache
@@ -16,10 +16,13 @@ class {{#lambda.pascalcase}}{{client}}{{/lambda.pascalcase}}Config(BaseConfig):
16
17
user_agent = UserAgent().add("{{#lambda.pascalcase}}{{client}}{{/lambda.pascalcase}}")
18
19
- assert app_id, "`app_id` is missing."
20
- assert api_key, "`api_key` is missing."
+ if app_id is None or not app_id:
+ raise ValueError("`app_id` is missing.")
21
22
- self.headers = {
+ if api_key is None or not api_key:
23
+ raise ValueError("`api_key` is missing.")
24
+
25
+ self.headers = {
26
"x-algolia-application-id": app_id,
27
"x-algolia-api-key": api_key,
28
"user-agent": user_agent.get(),
0 commit comments