<gh_stars>0
import urllib
import urllib2
import json

url = 'http://localhost:8000'
## type of requsts
hru={
    "type": "get",
    "fields": 
    [
       "email",
       "money","password","game"
    ],
    "conditions":
    [
       ["user", "=", "vika"]       
    ]
}
tr={
    "type": "update",
    "transaction":
    [
        {
          "action": "update",
          "field": "password",
          "value": "bub",
          "conditions": [["user", "=", "10"]]
       },
       
     {
          "action": "delete",
          "conditions": [["user", "=", "rrrrrrrr"]]
       },
        {
          "action": "insert",
          "user": "d",
          "password": "<PASSWORD>",
          "email": "vk<PASSWORD>",
               
       }
       
    ]
 }

param=urllib.urlencode({'json': json.dumps(tr)})
response = urllib2.urlopen(url,param)
print response.getcode()
print response.headers['Content']
response.close()
import urllib
import urllib2
import json

url = 'http://localhost:8000'
## type of requsts
hru={
    "type": "get",
    "fields": 
    [
       "email",
       "money","password","game"
    ],
    "conditions":
    [
       ["user", "=", "vika"]       
    ]
}
tr={
    "type": "update",
    "transaction":
    [
        {
          "action": "update",
          "field": "password",
          "value": "bub",
          "conditions": [["user", "=", "10"]]
       },
       
     {
          "action": "delete",
          "conditions": [["user", "=", "rrrrrrrr"]]
       },
        {
          "action": "insert",
          "user": "d",
          "password": "<PASSWORD>",
          "email": "vk<PASSWORD>",
               
       }
       
    ]
 }

param=urllib.urlencode({'json': json.dumps(tr)})
response = urllib2.urlopen(url,param)
print response.getcode()
print response.headers['Content']
response.close()
## type of requsts