title: Python sending AMF
body: <p>I'm Learning Python And for one of my project I need to POST data to server which uses AMF messaging.</p>
  
  <p>Captured headers looks like this:</p>
  
  <pre><code>POST (info hided)/amfgateway.php HTTP/1.1
  Host: (info hided)
  Connection: keep-alive
  Content-Length: 52
  Origin: (info hided)
  X-Requested-With: ShockwaveFlash/16.0.0.235
  User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
  Content-Type: application/x-amf
  Accept: */*
  Referer: (info hided)
  Accept-Encoding: gzip, deflate
  Accept-Language: lt,en-US;q=0.8,en;q=0.6,ru;q=0.4,pl;q=0.2
  Cookie: (info hided)
  
   bcAmfService.addFriend /1   
      Aa$
  </code></pre>
  
  <p>And it's not a problem for me to POST headers but how do I format data that is sended to server:</p>
  
  <p><img src="https://i.stack.imgur.com/GnrHN.png" alt="enter image description here"></p>
  
  <p>I know there is a PyAmf library and I looked at documentation but it's very abstract and for beginner like me it's hard to put pieces together in one code.</p>
  
  <p><strong>So how do I format this data in Python?</strong></p>