title: What is the best convention to generate multiple payload for different endpoints in python code?
body: <p>My project requires different request payload for different endpoints. I am generating each one of them in python code and pass the generated payload to the python requests library. It's working but I am looking for a more elegant/cleaner way to do it. I was thinking about having yaml files and read them to generate my payload. Looking for more ideas and better way to generate request payload.</p>
  
  <pre><code>def abc(self):
      payload = {
               'key1' :'1',
               'key2' : '2'
                 }
       return payload
  
  def call_abc(self):
      request_payload = self.abc()
      requests.post(url, json=request_payload, headers)
  </code></pre>