title: Python - custom keyboard for Telegram bot
body: <p>I'm trying to write up a Telegram bot from scratch using Python and Flask, without existing libraries, for learning sake.</p>
  
  <p>I'm still stuck with custom keyboard and its syntax. Can anyone show me the right method with a simple example? Starting from here:</p>
  
  <pre><code>#!/usr/bin/env python
  import json, requests
  
  keyboard = json.dumps({'inline_keyboard': [[ "&lt;user1&gt;", "&lt;user2&gt;" ]]})
  headers = {'Accept': 'application/json'}
  url = "https://api.telegram.org/bot&lt;bot-id&gt;/sendMessage"
  kbd = {'text':'Whatever','chat_id':'&lt;channel&gt;','reply_markup': keyboard}
  send_kbd = requests.post(url,data=kbd,headers=headers)
  </code></pre>
  
  <p>Thanks in advance.</p>