Hello! In addition to what David mentioned, here are other tips to make sure we can help you effectively:
- Use triple backticks to format your Python code: Select the programming language used in code blocks - users - Discourse Meta. I have edited your code to do that
- Please post code that is, to the best of your knowledge, correct, or at least starts running, before asking about higher-level Elasticsearch questions. Walk before you run.
I was about to give specific advice around quotes, but I just noticed that @jessgarson replied to Test Rest API through python - #14 by jessgarson with much more details than I would have. Please don't post duplicate questions like this. And let's focus on the other thread now.