@@ -0,0 +1,623 @@
+from django.db import connection%0Aimport requests%0A%0A%0Adef get(http_url, user_id):%0A    headers = %7B%0A        'Authorization': __auth_token(user_id)%0A    %7D%0A    r = requests.get(http_url, headers=headers)%0A%0A    return r.json()%0A%0A%0Adef post(http_url, user_id, json_data):%0A    headers = %7B%0A        'Authorization': __auth_token(user_id)%0A    %7D%0A    r = requests.post(http_url, headers=headers, data=json_data)%0A%0A    return r.json()%0A%0A%0Adef __auth_token(user_id):%0A    cursor = connection.cursor()%0A    cursor.execute('SELECT * FROM authtoken_token WHERE user_id = %25s',%0A                   str(user_id))%0A    return 'Token ' + cursor.fetchone()%5B0%5D%0A

Implement libray to use API